Nam*_* VU 4 wpf resources border thickness
我尝试创建String,Int32资源如下,但它不起作用.我收到错误,说该值无法转换.
如果你知道怎么做,请帮忙.
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<sys:Int32 x:Key="MyKey">1</sys:Int32>
</ResourceDictionary>
<Label Content="abb" BorderThickness="{StaticResource MyKey}" />
Run Code Online (Sandbox Code Playgroud)
该类型BorderThickness是System.Windows.Thinkness不Int32
<Thickness x:Key="MyKey" >1</Thickness>
Run Code Online (Sandbox Code Playgroud)
祝好运!
| 归档时间: |
|
| 查看次数: |
2902 次 |
| 最近记录: |