2010-10-10 17 views

Respuesta

13

Después de un tiempo, lo averigüe:

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

Espero que ayude!

+2

En mi CPU Intel Core i7-6700 @ 3.40GHz con Windows 10 Pro 64-Bit (Versión 10.0.15063) y Visual Studio 2015 Enterprise (Versión 14.0.25431.01 Actualización 3) con .NET Framework 4.5.2 con ~ 16 GB RAM libre y ~ 110 GB HD libre, 'System.Windows.SystemParameters.WindowCaptionHeight' devolvió 23 frente a los 39 que verifiqué a través del depurador. Mi XAML tiene como elemento raíz una 'Ventana' con 0's para' Margen', 'BorderThickness' y' Padding' y su elemento 'Content' es' DockPanel' con 0's para 'Margin'. El 'DockPanel'' ActualHeight' era 39 Tom

Cuestiones relacionadas