2016-07-22 156 views

回答

2

如果您的意思是更“响应”,您可以使用具有RowDefinitions和ColumnDefinitions且大小为“*”的Grid。

<Grid> <Grid.RowDefinitions> <RowDefinition Height="2*" /> <RowDefinition Height="*" /> <!-- this one below works the same as just '*' --> <RowDefinition /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="2*" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions>

星号将设置一个“权重”到指定的行/列,它将填补任何的空间留在网格。

还有更多的信息在这里:How to Make a WPF Window Responsive

相关问题