Skip to content
On this page

ComboBox

ComboBox displays a short list of items, from which the user can select an item.

  • Five styels: FilledComboBoxStyle and OutlinedComboBoxStyle.

Examples

xml
<mdc:ComboBox Style="{DynamicResource FilledComboBoxStyle}">
	<mdc:MenuItem Text="item 1" />
	<mdc:MenuItem Text="item 2" />
</mdc:ComboBox>
<mdc:ComboBox Style="{DynamicResource OutlinedComboBoxStyle}">
	<mdc:MenuItem Text="item 1" />
	<mdc:MenuItem Text="item 2" />
</mdc:ComboBox>

Properties

nametypedefault
ItemsObservableCollection<MenuItem>
ItemsSourceIList
SelectedIndexint-1
SelectedItemMenuItem
LabelTextstringLabel text
LabelFontColorColorstyle
ActiveIndicatorHeightintstyle
ActiveIndicatorColorColorstyle
BackgroundColorColorstyle
lFontColorColorstyle
FontFamilystring
FontSizefloat14
FontWeightint400
FontIsItalicboolfalse
OutlineWidthintstyle
OutlineColorColorstyle
StateLayerColorColorstyle
RippleDurationfloat0.5
RippleEasingEasingSinInOut
ContextMenuContextMenu
StyleStyleFilled
CommandICommand
CommandParameterobject

Events

nametype
SelectedChangedEventHandler<SelectedItemChangedEventArgs>
ClickedEventHandler<TouchEventArgs>
PressedEventHandler<TouchEventArgs>
ReleasedEventHandler<TouchEventArgs>
LongPressedEventHandler<TouchEventArgs>
RightClicked ( desktop only )EventHandler<TouchEventArgs>