4
元我想定義的double值,這樣我可以在許多UIElements
我如何定義StandardStyles.xaml
<Double x:Key="MyWidth">100</Double>
<String x:Key="MyString">This is my text</String>
它給我的錯誤Double is not supported in a Windows App project.
和同樣是字符串重用。
如果我在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 Parsing Failed. The type 'Double' was not found.
出於某種原因,這是行不通的。我收到錯誤「Windows Presentation Foundation(WPF)項目不支持Double。」我在.NET 4.0上。 – Pompair
Pompair不能說你爲什麼面臨這個問題,自去年以來我還沒有贏取代碼 –