我已经绑定了我的窗口的Height
和。Width
现在,Visual Studio 中的窗口太小了,我不能再处理它了。将默认值设置为Height
andWidth
将解决我的问题。有可能Binding
吗?
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Class="Sth.MainWindow"
x:Name="Window"
Width="{Binding Path=WidthOfImage, Mode=TwoWay}"
Height="{Binding Path=HeightOfImage, Mode=TwoWay}"
>
...
</Window>
我们可以在 WPF 中设置默认值Binding
吗?如何?