ComboBox.SelectionBoxItemTemplate プロパティ

定義

選択ボックスの内容の項目テンプレートを取得します。

public:
 property System::Windows::DataTemplate ^ SelectionBoxItemTemplate { System::Windows::DataTemplate ^ get(); };
public System.Windows.DataTemplate SelectionBoxItemTemplate { get; }
member this.SelectionBoxItemTemplate : System.Windows.DataTemplate
Public ReadOnly Property SelectionBoxItemTemplate As DataTemplate

プロパティ値

DataTemplate

項目テンプレート。

次の例では、a ContentPresenter のプロパティをContentプロパティにSelectionBoxItemTemplateバインドします。 のContentPresenter一部ControlTemplateComboBoxです。

完全なサンプルについては、「 ControlTemplates サンプルを使用したスタイル設定」を参照してください。

<ContentPresenter x:Name="ContentSite"
                  IsHitTestVisible="False"
                  Content="{TemplateBinding SelectionBoxItem}"
                  ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                  ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                  Margin="3,3,23,3"
                  VerticalAlignment="Stretch"
                  HorizontalAlignment="Left">
</ContentPresenter>

注釈

XAML 属性の使用方法

<object property="{TemplateBinding SelectionBoxItemTemplate}"/>  

依存プロパティ情報

識別子フィールド SelectionBoxItemTemplateProperty
メタデータのプロパティが次に設定されている true なし

適用対象