I am busy creating a WPF (in C#) application where reports have to be seen using a web browser. The application and all data is show perfectly except for my menu items that are used for navigation on the page on which the web browser is. I have read that the web browser is always modal and will therefore always be shown 'in front'. Question is how do I get my menu items (placed in menu at the top of the screen) to display over the web browser? The menu opens but obviously the items are behind the web browser and inaccessible to the user. I would change the flow direction of the menu but the web browser covers the entire width of the page.
Update: I managed to get the menu sub items to display in an upwards direction (seen in design view) in an attempt to completely avoid the web browser control. Problem is now I can't see the menu, what am I missing? Here is the coding to set the popup placement to "top":
<Page.Resources>
<ControlTemplate x:Key="MenuControlTemplate1" TargetType="{x:Type MenuItem}">
<Popup x:Name="PART_Popup"
AllowsTransparency="true"
Placement="Top"
VerticalOffset="-3"
HorizontalOffset="-2"
IsOpen="{Binding Path=IsSubmenuOpen,RelativeSource={RelativeSource TemplatedParent}}"
Focusable="false"
PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}">
<Themes:SystemDropShadowChrome Name="Shdw"
Color="Transparent">
<ContentControl Name="SubMenuBorder"
Template="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type FrameworkElement}, ResourceId=SubmenuContent}}"
IsTabStop="false">
<ScrollViewer Name="SubMenuScrollViewer" CanContentScroll="true" MaxHeight="400"
Style="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type FrameworkElement}, ResourceId=MenuScrollViewer}}">
<Grid RenderOptions.ClearTypeHint="Enabled">
<Canvas Height="0" Width="0" HorizontalAlignment="Left" VerticalAlignment="Top">
<Rectangle
Height="{Binding ElementName=SubMenuBorder,Path=ActualHeight}"
Width="{Binding ElementName=SubMenuBorder,Path=ActualWidth}" />
</Canvas>
<ItemsPresenter Name="ItemsPresenter" Margin="2"
KeyboardNavigation.TabNavigation="Cycle"
KeyboardNavigation.DirectionalNavigation="Cycle"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
Grid.IsSharedSizeScope="true"/>
</Grid>
</ScrollViewer>
</ContentControl>
</Themes:SystemDropShadowChrome>
</Popup>
<ControlTemplate.Triggers>
<Trigger Property="IsSuspendingPopupAnimation"
Value="true">
<Setter TargetName="PART_Popup"
Property="PopupAnimation"
Value="None"/>
</Trigger>
<Trigger SourceName="PART_Popup"
Property="Popup.HasDropShadow"
Value="true">
<Setter TargetName="Shdw"
Property="Margin"
Value="0,0,5,5"/>
<Setter TargetName="Shdw"
Property="Color"
Value="#71000000"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Page.Resources>