WPF 窗口展开
原始窗口:
展开后的窗口:
请问这要如何实现? 谢谢!
------解决方案-------------------- <Grid Name="gridInfo" Margin="0,0,0,13">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="181" />
<ColumnDefinition Width="720*" />
</Grid.ColumnDefinitions>
。。。。。。。
</Grid>
WPF用这个GRID分割成2块区域。
#region 折叠
double oldLeftWidth = 0;
private void btnToLeftImg_Click(object sender, RoutedEventArgs e)//隐藏
{
oldLeftWidth = gridInfo.ColumnDefinitions[0].Width.Value;
gridInfo.ColumnDefinitions[0].Width = new GridLength(0);
}
private void btnToRoghtImg_Click(object sender, RoutedEventArgs e)//显示
{
gridInfo.ColumnDefinitions[0].Width = new GridLength(oldLeftWidth);
}