我有以下XAML:
<Window x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:WpfToolkit="http://schemas.microsoft.com/wpf/2008/toolkit"
Title="{x:Static prop:Resources.Window1}"
Height="{Binding WindowHeight}"
MinHeight="{Binding WindowMinHeight}"
MinWidth="500">
WindowHeight
的吸气者按预期射击。
但是当我添加:
Width="750"
到XAML ..:
<Window x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:WpfToolkit="http://schemas.microsoft.com/wpf/2008/toolkit"
Title="{x:Static prop:Resources.Window1}"
Height="{Binding WindowHeight}"
MinHeight="{Binding WindowMinHeight}"
Width="750"
MinWidth="500">
.. WindowHeight
的吸气剂不起火。
为什么会这样?
谢谢,乔
答案 0 :(得分:4)
试试这个:
<Window x:Name="window" x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:WpfToolkit="http://schemas.microsoft.com/wpf/2008/toolkit"
Title="{x:Static prop:Resources.Window1}"
Height="300"
Width="{Binding Height, ElementName=window}">