Laith
Laith

Reputation: 6091

XAML Primitives in WinRT / Win8 Metro

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!

Upvotes: 9

Views: 1462

Answers (1)

Shawn Kendrot
Shawn Kendrot

Reputation: 12465

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

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

Upvotes: 19

Related Questions