9
votes

Has anyone been able to add primitives in XAML in WinRT? I'm trying to run the following, which is standard in all XAML-based technologies except for WinRT:

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:System="using:System">

    <System:Double x:Key="MyWidth">550</System:Double>

</ResourceDictionary>

This does not show an error in Visual Studio, but it will throw a XamlParseException with a message "The type 'Double' was not found..."

Thanks!

1

1 Answers

19
votes

The namespace for system types have been replaced with 'x'

<x:Double>550</x:Double>