I want to have a button with a higher z order than hwndHost in wpf. Changing the z index in grid, panel and canvas did not work. Sources found in msdn documents state the hosted window in hwndHost will always stay on of other WPF elements in the same top-level window and even on top adorner elements. Here, are the sources I referred.
I want to know if these sources are outdated. And if there is any other way to have a ui element like button on top of the hwndHost.
I want to know if there is any way to achieve the below idea. The purpose of that button is to show or hide Menu. I feel using popups may complicate things for my requirement. Is there any other way or popup is my only goto?
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Menu Grid.Column="0" />
<ContentControl Grid.Column="1" Content={"Binding HostedWindow"} Grid.ZIndex="0">
</ContentControl>
<Button Grid.Column="1" Content="Show Menu" Click="ShowMenu_Click" Grid.ZIndex="1"/>
</Grid>
I expect the button to be on top of the Hosted Window