Popup and ComboBox do not work together nicely
Posted: 08 Jun 2020, 07:56
Hi,
Here is the XAML that illustrates the problem. Click the button to show a Popup that has a combobox internally.
The Popup is configured with StaysOpen="False". After the Popup appears, click the combobox and select the item that is shown beyond the Popup Window.
The expected behavior is that the item becomes the selected part of the Combobox and the Popup kept shown (this is the behavior of WPF).
However, the current behavior of NoesisGUI is to close the Popup and item inside the Combobox is not selected.
Here is the XAML that illustrates the problem. Click the button to show a Popup that has a combobox internally.
The Popup is configured with StaysOpen="False". After the Popup appears, click the combobox and select the item that is shown beyond the Popup Window.
The expected behavior is that the item becomes the selected part of the Combobox and the Popup kept shown (this is the behavior of WPF).
However, the current behavior of NoesisGUI is to close the Popup and item inside the Combobox is not selected.
Code: Select all
<Grid Background="White">
<ToggleButton x:Name="PopupToggle" Height="30" Width="50" IsChecked="{Binding IsOpen, ElementName=Popup}"></ToggleButton>
<Popup x:Name="Popup" Placement="Bottom" PlacementTarget="{Binding ElementName=PopupToggle}" StaysOpen="False">
<Grid Width="100" Height="100" Background="Red">
<ComboBox Width="50" Height="30">
<ComboBoxItem>A</ComboBoxItem>
<ComboBoxItem>B</ComboBoxItem>
<ComboBoxItem>C</ComboBoxItem>
<ComboBoxItem>D</ComboBoxItem>
<ComboBoxItem>E</ComboBoxItem>
<ComboBoxItem>F</ComboBoxItem>
<ComboBoxItem>G</ComboBoxItem>
<ComboBoxItem>H</ComboBoxItem>
<ComboBoxItem>I</ComboBoxItem>
<ComboBoxItem>J</ComboBoxItem>
</ComboBox>
</Grid>
</Popup>
</Grid>