我正在使用WPF的wrappanel。问题是在它的右侧有一个我想减少的空白空间,我不知道如何。保证金在wrappanel
在下面的图片中,您可以看到左侧边缘的右侧,我希望它们都像左侧一样。
这是我的XAML:
<Grid x:Name="root">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="263*" />
<ColumnDefinition Width="240*" />
</Grid.ColumnDefinitions>
<Rectangle Fill="LightBlue"/>
<WrapPanel >
<Rectangle Margin="10" Fill="Red" Width="40" Height="40"></Rectangle>
<Rectangle Margin="10" Fill="Red" Width="40" Height="40"></Rectangle>
<Rectangle Margin="10" Fill="Red" Width="40" Height="40"></Rectangle>
<Rectangle Margin="10" Fill="Red" Width="40" Height="40"></Rectangle>
<Rectangle Margin="10" Fill="Red" Width="40" Height="40"></Rectangle>
<Rectangle Margin="10" Fill="Red" Width="40" Height="40"></Rectangle>
</WrapPanel>
</Grid>