[英]Winrt Xaml Grid ROw not filling Space with *
I have the problem, that my Grid is not filling the space as I want it. 我有问题,我的网格没有填充我想要的空间。 Here some code: 这里有一些代码:
<HubSection>
<Grid Width="850">
<Grid.RowDefinitions>
<RowDefinition Height="35"/>
<RowDefinition Height="*"/>
<RowDefinition Height="310"/>
</Grid.RowDefinitions>
<Input:RadDatePicker Grid.Row="0" Value="{Binding CurrentDate, Mode=TwoWay}" />
<ListView
Grid.Row="1">...
</ListView>
<Grid Height="310"
Grid.Row="2">...
</Grid>
... I want that the middle row is filling the space up of the hubsection. ......我希望中间的一行充满了中心区域的空间。 Instead it now just fills up when the listview contains enough items. 相反,它现在只在listview包含足够的项目时填满。 Any idea? 任何想法?
Now the filled ListView: 现在填充的ListView:
I would try setting the VerticalContentAlignment
of the HubSection
to Stretch
as well as setting the VCA of the outer grid to that option. 我会尝试将HubSection
的VerticalContentAlignment
设置为Stretch
,并将外部网格的VCA设置为该选项。 I'm suspecting the default might be Center
or Top
and so the minimizing vertical alignment control from the parent control and the expanding star-sized row setting of the inner grid come in a little bit of a conflict that some layout prioritizing rules probably resolve in getting the VCA rule to win. 我怀疑默认值可能是Center
或Top
,因此从父控件最小化垂直对齐控制和内部网格的扩展星型行设置会产生一些冲突,某些布局优先级规则可能会解决让VCA规则获胜。
For similar layout issues it is usually best to analyze with a visual tree debugger such as the XAML Spy or WinRT XAML Toolkit. 对于类似的布局问题,通常最好使用可视树调试器进行分析,例如XAML Spy或WinRT XAML Toolkit。 You can also try tracing these various properties by walking the visual tree with the VisualTreeHelper
class yourself. 您还可以尝试使用VisualTreeHelper
类VisualTreeHelper
遍历可视树来跟踪这些不同的属性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.