安装Visual Studio 2012并打开Silverlight 5项目后,我收到与TypeConverter相关的各种设计时间错误,例如:
The TypeConverter for “FontWeight” does not support converting from a string.
The TypeConverter for “Point” does not support converting from a string.
The TypeConverter for “Thickness” does not support converting from a string.
然而,这不是详尽的列表.
这些例子是:
< Setter Property =“FontWeight”Value =“Bold”/>
< RadialGradientBrush GradientOrigin =“0.5,0.5”> ... < Setter Property =“Padding”Value =“0”/>
我在这里缺少一些明显的东西,还是这个bug?
解决方法
我有同样的问题:在资源部分定义
<UserControl.Resources> <local:MyConverter x:Key="myConverter"/> </UserControl.Resources>
在XAML UE中,我不得不改变
...Width="{Binding BindingProperty,Converter=myConverter}"...
至
...Width="{Binding BindingProperty,Converter={StaticResource myConverter}..."
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。