ComboBoxItem exposes some useful properties—IsSelected andIsHighlighted—and useful events—Selected and Unselected. Using ComboBoxItem also avoids a quirkybehavior with showing content controls in the selection box (when IsEditable isfalse): If an item in a ComboBox is a content control, the entire controldoesn’t get displayed in the selection box. Instead, the inner content isextracted and shown. By using ComboBoxItem as the outermost content control,the inner content is now the entire control that you probably wanted to bedisplayed in the first place. Because ComboBoxItem is a content control, it is also handy for adding simplestrings to a ComboBox (rather than using something like TextBlock or Label).
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
ComboBoxItem exposes some useful properties—IsSelected andIsHighlighted—and
useful events—Selected and Unselected. Using ComboBoxItem also avoids a quirkybehavior with showing content controls in the selection box (when IsEditable isfalse): If an item in a ComboBox is a content control, the entire controldoesn’t get displayed in the selection box. Instead, the inner content isextracted and shown. By using ComboBoxItem as the outermost content control,the inner content is now the entire control that you probably wanted to bedisplayed in the first place.
Because ComboBoxItem is a content control, it is also handy for adding simplestrings to a
ComboBox (rather than using something like TextBlock or Label).