【发布时间】:2019-07-31 12:04:42
【问题描述】:
所以我在TabControl 里面有这个ListView:
<TabControl>
<TabItem Width="70" Height="70" Margin="0,0,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="1">
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="1">
<ListView>
...
</ListView>
</Grid>
<Grid>
</Grid>
</Grid>
</TabItem>
</TabControl>
我的窗口 ResizeMode 是 CanResizeWithGrip,当我调整我的应用程序大小时,我希望我的 ListView 根据我的 Window 宽度自动调整大小。
当我的应用程序宽度改变了我的ListView 时,我尝试定义我的ListView HorizontalAlignment Stretch bu。
【问题讨论】:
标签: wpf listview window-resize autoresize