So, this used to be possible in WPF & SL:
<Grid.Resources>
<x:Double x:Name="MyDouble">1.2</x:Double>
</Grid.Resources>
But in WinRT-XAML it just underlines with:
TypeConverter syntax error occurred while processing initialization string ‘1.2’
Anybody know the trick to do this?
Solution
Use x:Key not x:Name!
<Grid.Resources>
<x:Double x:Key="MyDouble">1.2</x:Double>
</Grid.Resources>
I also get this:
“Type ‘Double’, and “Value Types” in general, cannot use x:Name”
If you switch from x:Name to x:Key – it works fine.