에 액세스 : 당신은 내가 2 열을 볼 수있는어떻게이 같은 상황이 신장 요소의 실제 높이 = 자동
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="560"/>
<ColumnDefinition Width="250"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <!-- status infos & content start -->
<RowDefinition Height="Auto" /> <!-- status infos -->
<RowDefinition Height="Auto" /> <!-- status infos -->
<RowDefinition Height="Auto" /> <!-- status infos -->
<RowDefinition Height="*"/> <!-- content ends -->
</Grid.RowDefinitions>
<!-- image a list of custom controls directed to the first or second column on all rows here -->
<SomeCustomControl Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="2" />
</Grid>
이, 오른쪽에 하나가 더 많거나 적은 예약 상태 정보입니다는 콘텐츠로 남았습니다. "SomeCustomControl"에는 Control이 너무 커서 ColumnSpan = "2"로 설정해야합니다. 여전히 오른쪽 열에 상태 컨트롤이 있음을 알 수 있습니다.
<Grid x:Name="LayoutRoot">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="250"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
[...]
<RowDefinition Height="Auto" />
<RowDefinition Height="*" /> <!-- problem control here -->
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- a list of Controls limited to the first column -->
<ProblemControl Grid.Column="0" Grid.ColumnSpan="2" />
</Grid>
이제 SomeCustomControl의 첫 번째 행의 첫 번째 열 제한 컨트롤을 포함, 다음 내 ProblemControl가 포함 된 행이 : SomeCustomControl에서 나는 이런 식으로 뭔가가있다. 상태 컨트롤의 높이는 미리 결정되지 않고 표시된 상태 정보에 따라 다릅니다. 첫 번째 열로 제한된 SomeCustomControl의 컨트롤 또한 다른 높이를 가지며 현재 콘텐츠를 통해 자동으로 결정됩니다.
이제 ProblemControl이 일부 상태 컨트롤과 겹치는 문제가 있습니다. 내 상태 컨트롤 및 SomeCustomControl 제한된 컨트롤의 높이를 계산하려면 시도했지만 모든 컨트롤을 동적으로 크기가 올바른 높이 얻이 수없는 것처럼. RowDefinitions의 높이에는 모두 Auto 타입의 Height와 값 1이 포함되어 있습니다. 구체적인 컨트롤의 Height는 NaN 인 것처럼 보입니다.
높이를 계산하거나 다른 방법으로 중첩을 방지하는 방법에 대한 아이디어.
컨트롤이 보이기 시작했기 때문에이 값에는 "이전"값 (현재 변경된 상태 정보에 따라 0과 일부 값이 변경됨)이 포함되어있는 것처럼 보입니다. 어쩌면 내가 컨트롤을 볼 수있는 후 해고 계산을 넣어 어떤 이벤트를 찾을 수 있습니다. 어쨌든 ActualHeight의 Thx입니다. 나는 이제 새로운 안경이 필요 없다는 변명의 이유를 알아 냈습니다. P – gsnerf