Class SfComboBoxItem
Represents the container for an item in a SfComboBox control.
Inheritance
System.Object
SfComboBoxItem
Namespace: Syncfusion.UI.Xaml.Editors
Assembly: Syncfusion.Editors.WinUI.dll
Syntax
public class SfComboBoxItem : ListViewItem
Examples
The following example shows how to customize the template of SfComboBoxItem generated in the drop down list of ComboBox control.
<Grid>
<Grid.DataContext>
<local:ComboBoxViewModel/>
</Grid.DataContext>
<editors:SfComboBox ItemsSource="{Binding Sports}"
TextMemberPath="Name"
DisplayMemberPath="Name">
<editors:SfComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"
Foreground="Red"
FontWeight="Bold"/>
</DataTemplate>
</editors:SfComboBox.ItemTemplate>
</editors:SfComboBox>
</Grid>
Constructors
SfComboBoxItem()
Initializes a new instance of the SfComboBoxItem class.
Declaration
public SfComboBoxItem()
Fields
HighlightBorderBrushProperty
Identifies HighlightBorderBrush dependency property.
Declaration
public static readonly DependencyProperty HighlightBorderBrushProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for the HighlightBorderBrush dependency property. |
Properties
HighlightBorderBrush
Gets or sets a highlight border color of combo box item.
Declaration
public Brush HighlightBorderBrush { get; set; }
Property Value
Type |
---|
Microsoft.UI.Xaml.Media.Brush |
Methods
OnCreateAutomationPeer()
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type |
---|
Microsoft.UI.Xaml.Automation.Peers.AutomationPeer |