Question

I have a DockPanel as the root element for my window.

I have another DockPanel that is essentially a menu bar which is set to be docked to the Top of the root-element-DockPanel.

I would like to have an image docked to the top of the root-element-DockPanel that floats over the menu-bar-DockPanel.

For example:

<DockPanel x:Name="RootDockPanel">
  <Image Souce="/MyProject;component/Images/imageName.jpg" DockPanel.Dock="Top" Panel.ZIndex="3" />
  <DockPanel x:Name="MenuDockPanel" DockPanel.Dock="Top" Panel.ZIndex="0">
    <!-- content -->
  </DockPanel>
</DockPanel>

I have tried setting the Panel.ZIndex of the Image to something higher than the Panel.ZIndex of the menu-bar-DockPanel but this doesn't work.

Since the ZIndex is proving to be useless, I'm not sure how to accomplish this and I'm looking for your input.

Thanks for your help!

-Frinny

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top