We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
margin是自己与父容器的间距 padding是自己与子控件的间距
<Grid Background="AntiqueWhite"> <Border Margin="10" Padding="20" Background="CadetBlue"> <Button Background="BurlyWood"></Button> </Border> </Grid>
效果如图所示 Border通过Margin与外部Grid间隔10 Border通过Padding与内部Button间隔20
https://github.com/zLulus/NotePractice/tree/dev3/WPF/WpfDemo/MarginAndPadding
There was an error while loading. Please reload this page.