2016-07-22 158 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

相關問題