Textblock comboitem not displaying when selected
Posted: 24 Oct 2020, 20:33
Hi,
I ran into this issue. The following will display both options when combo box is opened, but selecting Option 1 will lead to an invisible selected item.
Regards
I ran into this issue. The following will display both options when combo box is opened, but selecting Option 1 will lead to an invisible selected item.
Code: Select all
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ComboBox Foreground="red" Height="36" SelectedIndex="1">
<ComboBoxItem>
<TextBlock Foreground="green">Option 1</TextBlock>
</ComboBoxItem>
<ComboBoxItem Foreground="blue">Option 2</ComboBoxItem>
</ComboBox>
</Grid>