【发布时间】:2015-09-26 12:12:07
【问题描述】:
是否可以在 ResourceDictionary 中将 GridLength 定义为 XAML 资源,并使用另一个 StaticResource 设置长度值?
我想要实现的是这样的:
<System:Double x:Key="MyValue">8</System:Double>
<Thickness x:Key="MyThickness"
Bottom="{StaticResource MyValue}"
Left="{StaticResource MyValue}"
Right="{StaticResource MyValue}"
Top="{StaticResource MyValue}" />
<GridLength x:Key="MyGridLength">{StaticResource MyValue}</GridLength>
有办法吗? 非常感谢!
【问题讨论】:
标签: c# .net wpf xaml resourcedictionary