dev*_*rgg 5 .net c# wpf user-interface xaml
我有一个堆栈,堆栈中有一个网格。
调整窗口大小时,需要增加堆栈和网格的大小。我将Stack and Grid HorizontalAlignment设置为“ Stretch”
堆栈工作正常,但是当我调整窗口大小时网格尺寸不会增加
这是我的代码。
<StackPanel Background="Blue" Orientation="Horizontal" HorizontalAlignment="Stretch" Grid.Column="1" Margin="13,0,0,0" >
<Grid HorizontalAlignment="Stretch" Background="Beige" Width="515">
<Grid.RowDefinitions>
<RowDefinition Height="100" />
<RowDefinition Height="240" />
<RowDefinition Height="100" />
</Grid.RowDefinitions>
<Image x:Name="imageMap" Source="Resources/images.jpg" HorizontalAlignment="Stretch" Grid.Row="0" Stretch="Fill" Margin="0,0,0,0" />
</Grid>
</StackPanel>
Run Code Online (Sandbox Code Playgroud)
请指教
| 归档时间: |
|
| 查看次数: |
2259 次 |
| 最近记录: |