ComboBox.SelectionBoxItemTemplate Właściwość

Definicja

Pobiera szablon elementu zawartości pola wyboru.

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

Wartość właściwości

DataTemplate

Szablon elementu.

Przykłady

Poniższy przykład wiąże Content właściwość obiektu ContentPresenter z właściwością SelectionBoxItemTemplate . Element ContentPresenter jest częścią ControlTemplate elementu dla elementu ComboBox.

Pełny przykład można znaleźć w temacie Styling with ControlTemplates Sample (Styling with ControlTemplates Sample( Styling with ControlTemplates Sample (Styling with ControlTemplates Sample).

<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>

Uwagi

Użycie atrybutu języka XAML

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

Informacje dotyczące właściwości zależności

Pole identyfikatora SelectionBoxItemTemplateProperty
Właściwości metadanych ustawione na true Brak

Dotyczy