I am looking to declare an array in XAML. I can do this in WPF. Just can't seem to find the right namespace in WinRT. Anyone know?
<Page xmlns:list="?Something?">
<Page.Resources>
<x:Int32 x:Name="MyScalarValue">123</x:Int32>
<list:Array x:Name="MyValueList">
<x:Int32>123</x:Int32>
<x:Int32>456</x:Int32>
<list:Array>
</Page.Resources>
</Page>
x:Array (and x:Static and a few other ones) aren't presently supported in WinRT. For that matter, x:Array isn't supported in Silverlight either, despite developers pushing for it.
Given the fact that the XAML implementation for WinRT appears to be more closely aligned with SL than WPF, this isn't too surprising.
Edit - some more info regarding SL4+ vs. WPF differences:
"Notable omissions here that exist in WPF or [MS-XAML] are x:Array, x:Code, x:Type, and code access modifiers."
Also, a delta between SL4 and the WinRT implementation here, and its associated links, makes it clear that these bits didn't magically make it into WinRT when they were (and still are) omitted from SL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With