나는 최대화 된 WPF 윈도우의 너비 - 속성을 가져 오는 방법을 검색합니다.WPF에서 최대화 될 때 창의 크기 가져 오기
아무 아이디어 나 어떻게 절대 값을 얻을 수 있습니까?
고마워요.
나는 최대화 된 WPF 윈도우의 너비 - 속성을 가져 오는 방법을 검색합니다.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>
는 그냥
ActualWidth
속성을 사용합니다.
Width
대신 ActualWidth
을 사용하십시오.
ActualWidth 너비가 최대화 상태가됩니다. 이것에 대해