如何在StandardStyles.xaml中定义基元
发布时间:2020-12-14 04:37:37 所属栏目:Windows 来源:网络整理
导读:我想定义双值,以便我可以在许多UIElements中重用它 Double x:Key="MyWidth"100/DoubleString x:Key="MyString"This is my text/String 它给了我错误Windows应用程序项目中不支持Double.同样是为了字符串. 如果我在StandardStyles.xaml中包含xmlns:sys =“us
我想定义双值,以便我可以在许多UIElements中重用它
<Double x:Key="MyWidth">100</Double> <String x:Key="MyString">This is my text</String> 它给了我错误Windows应用程序项目中不支持Double.同样是为了字符串. 如果我在StandardStyles.xaml中包含xmlns:sys =“using:System”,那么它就是在编译. <sys:Double x:Key="MyWidth">100</sys:Double> <sys:String x:Key="MyString">This is my text</sys:String> 它在运行时给出异常XAML解析失败.找不到“Double”类型. 解决方法
不需要包含System名称空间.
已经有一个命名空间包括xmlns:x =“http://schemas.microsoft.com/winfx/2006/xaml” <x:Double x:Key="MyWidth">100</x:Double> <x:String x:Key="MyString">This is my text</x:String> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 如何在Windows XP / 7上的Python 3中将文件打印到纸上?
- 在Windows环境中进行部署
- regedit系统注册表,msconfig系统配置
- batch-file-dos命令将文件名和扩展名分解成变量
- xna – 与Microsoft“WinForms Series 1:Graphics Device”
- 是否有针对MS Windows的开源OpenGL实现?
- 我们可以在windows上使用git-cvs吗?
- 尝试更改“WindowsServer2008”的状态时,应用程序遇到错误
- .net-4.0 – windows xp上的visual studio 2013
- windows-server-2016 – Windows Server 2016中的“数据共享