How to get the title bar height of the main application windows?

I use a prism to upload views to the region. The problem is that the loaded view overlapped the title bar of the main windows - the panel contains the title, close / minimize / maximize buttons. How can I get the height of the header? Prefer getting the correct value in xaml codes.

+5
source share
1 answer

After a while I realized:

<Window xmlns:local="clr-namespace:System.Windows;assembly=PresentationFramework">
  <YourView Height="{x:Static local:SystemParameters.WindowCaptionHeight}" />
</Window>

Hope this helps!

+13
source

All Articles