开发者

How to leave margin between elements in the stack panel

开发者 https://www.devze.com 2023-02-12 18:32 出处:网络
I us开发者_如何学Ce the stack panel. It looks like every elements inside is stacking tightly. How to leave some margin between them.Easiest way is to give each item it\'s own Margin<StackPanel Grid

I us开发者_如何学Ce the stack panel. It looks like every elements inside is stacking tightly. How to leave some margin between them.


Easiest way is to give each item it's own Margin


<StackPanel Grid.Row="1" Orientation="Horizontal">
            <Rectangle Fill="White" Stroke="Black" Width="100" Height="35" StrokeThickness="5" Margin="5,0,0,0"/>
            <Rectangle Fill="White" Stroke="Black" StrokeThickness="5" Width="100" Height="35" Margin="5,0,0,0"/>
            <Rectangle Fill="White" Stroke="Black" Width="100" Height="35" Margin="5,0,0,0" StrokeThickness="5"/>
        </StackPanel>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号