引入system
xmlns:system="clr-namespace:System;assembly=mscorlib"
设置参数资源
<Window.Resources>
<system:Double x:Key="ButtonWidth">90</system:Double>
</Window.Resources>
使用参数资源
<Button Width="{StaticResource ButtonWidth}"/>
微信扫一扫
xmlns:system="clr-namespace:System;assembly=mscorlib"
<Window.Resources>
<system:Double x:Key="ButtonWidth">90</system:Double>
</Window.Resources>
<Button Width="{StaticResource ButtonWidth}"/>
相关推荐