csharpcsharp
csharpcsharp

Reputation: 23

Primitive type in resource in XAML 2006?

I want to have a resource of type double, (or strokethickness as a matter of fact). How I can achieve that?

Upvotes: 1

Views: 184

Answers (1)

Clemens
Clemens

Reputation: 128136

Declare a XAML namespace for the mscorlib assembly:

<Window ... xmlns:sys="clr-namespace:System;assembly=mscorlib">
    <Window.Resources>
        <sys:Double x:Key="thickness">5</sys:Double>
    </Window.Resources>
    ...
</Window>

Upvotes: 3

Related Questions