<Grid x:Name="SidebarGrid" LayoutUpdated="gridlayoutupdated">
<Grid.RowDefinitions>
<RowDefinition Height="250" />
<RowDefinition Height="*"/>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
该行大小根据内容调整,但在内容设置后,我希望能够获取高度。
<ScrollViewer Height={Binding ActualHeight, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=RowDefinition}}>
但没有成功。 - C. Tewalt<RowDefinition Name=rowDefinition1"/>
,并且使用以下绑定:<ScollViewer Height="{Binding ActualHeight, ElementName=rowDefinition1}"/>
- C. Tewalt