add to the head of the xamlfile
xmlns:System="clr-namespace:System;assembly=mscorlib"
Then Add to the resouce section:
<System:Double x:Key="theMargin">2.35</System:Double>
Last, use a thickness on the margin:
<Button Content="Next">
<Button.Margin>
<Thickness Top="{StaticResource theMargin}" Left="0" Right="0"
Bottom ="{StaticResource theMargin}" />
</Button.Margin>
</Button>
本文详细介绍了如何在XML文件中添加系统相关的元素,并通过资源引用为边距应用厚度,具体步骤包括导入命名空间、定义双精度变量、在按钮元素中使用静态资源边距属性。
1120

被折叠的 条评论
为什么被折叠?



