2010-10-10 77 views

回答

13

一段时间后,我看着办吧:

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

希望帮助!

+2

在运行Windows 10 Pro 64位(版本10.0.15063)和Visual Studio 2015 Enterprise(版本14.0.25431.01更新3)的英特尔酷睿i7-6700 CPU @ 3.40GHz上,针对.NET Framework 4.5.2,使用约16 GB RAM free和〜110 GB HD free,'System.Windows.SystemParameters.WindowCaptionHeight'返回23与我通过调试器验证的39。我的XAML的根元素是'Window','Margin','BorderThickness'和'Padding'的值为0,'Content'元素是'DockPanel','Margin'的值为0。 'DockPanel'的'ActualHeight'是39 < Tom 2017-08-23 17:05:14

相关问题