プロパティMaxHeightは、次のようなRowDefinitionsでは無視されるようですHeight="Auto"
。
次のXAMLを検討してください。
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" MaxHeight="100"/>
</Grid.RowDefinitions>
<ListBox>
<ListBox.Items>
<ListBoxItem>a</ListBoxItem>
<ListBoxItem>b</ListBoxItem>
<ListBoxItem>c</ListBoxItem>
<ListBoxItem>d</ListBoxItem>
<ListBoxItem>e</ListBoxItem>
<ListBoxItem>f</ListBoxItem>
<ListBoxItem>g</ListBoxItem>
<ListBoxItem>h</ListBoxItem>
<ListBoxItem>i</ListBoxItem>
<ListBoxItem>j</ListBoxItem>
</ListBox.Items>
</ListBox>
</Grid>
グリッドは100ディップより大きくなります。
RowDefinitionの高さを制限するにはどうすればよいですか?