I have an existing UWP app that I am adding WinUI (v2) to for updated visual controls. I have a commandbar with a button that opens a flyout. Like so:
<AppBarButton x:Name="FindButton" Icon="Find" Label="Find Text"
ToolTipService.ToolTip="Find (Ctrl+F)" AllowFocusOnInteraction="True">
<AppBarButton.KeyboardAccelerators>
<KeyboardAccelerator Modifiers="Control" Key="F"/>
</AppBarButton.KeyboardAccelerators>
<AppBarButton.Flyout>
<Flyout>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Text="Find what" Margin="5"/>
<TextBox x:Name="FindTextBox" Grid.Row="1" Grid.Column="0" Margin="5" PreviewKeyDown="FindTextBox_PreviewKeyDown"/>
<CheckBox x:Name="MatchCaseCheckbox" Grid.Row="2" Grid.Column="0" Content="Match case" Margin="5"/>
<StackPanel Grid.Row="3" Grid.Column="0" Orientation="Horizontal">
<Button Content="Find Previous" Tag="Prev" Margin="5" Click="FindText_Click"/>
<Button Content="Find Next" Tag="Next" Margin="5" Click="FindText_Click"/>
</StackPanel>
</Grid>
</Flyout>
</AppBarButton.Flyout>
</AppBarButton>
When the button is in the overflow menu, the overflow menu will not close when the flyout is open causing it to appear on-top. Is there a way to cause the flyout opening to close the commandbar overflow? I couldn't find a way. This only seems to be an issue with WinUI since it wasn't an issue before installing the package to my app.
