我有一个简单的 wpf 应用程序,我想在其中删除一列,并在按下 ctrl+空格时让剩余的(在第 2 列中)填充窗口。我已经研究了键绑定和命令,但我无法弄清楚这一点。
代码:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="24" />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="268" MinWidth="188" MaxWidth="346"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<GridSplitter Grid.Row="0" Grid.Column="1" HorizontalAlignment="Stretch" Height="64" Width="5"/>
<Grid Grid.Row="0" Grid.Column="2"/>
<Label Grid.Row="0" Grid.Column="0" Content="Collections" FontFamily="Noto Sans" Foreground="#FF9B9B9B" FontSize="16" Name="TESTTEST" />
<Button Content="Add" Grid.Row="0" Grid.Column="0" VerticalAlignment="Top" HorizontalAlignment="Right" Grid.ColumnSpan="2" Margin="0,7,3,0" />
</Grid>
<StatusBar Grid.Row="1" Background="#FF151515" Foreground="#FF636363" BorderBrush="#FF1D1D1D"/>
</Grid>