use*_*567 1 size wpf window maximize-window
我搜索一种获得最大化WPF窗口的宽度属性的方法.
任何想法我怎样才能获得绝对价值?
非常感谢.
那这个呢:
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Label Content="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}, Mode=FindAncestor}, Path=ActualWidth}"></Label>
</Grid>
</Window>
Run Code Online (Sandbox Code Playgroud)
只需使用该ActualWidth物业.
| 归档时间: |
|
| 查看次数: |
6897 次 |
| 最近记录: |