Basp
Topic Author
Posts: 22
Joined: 08 May 2014, 10:09

[Unity] Ignoring unknown type 'mscorlib.Double'

06 Aug 2014, 16:02

I have a resource dictionary that defines some default values for widths, radiuses, fontsizes, etc. I've defined these as follows:
	<System:Double x:Key="MessageCornderRadius">6</System:Double>
	<System:Double x:Key="MessageWidth">400</System:Double>
	<System:Double x:Key="MessageFontSize">16</System:Double>
	<System:Double x:Key="LargeFontSize">20</System:Double>
In the root element I've declared the System namespace as follows:
<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:System="clr-namespace:System;assembly=mscorlib"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	
Now, noesis gives me the compiler warning "Ignoring unknown type 'mscorlib.Double'.

What am I doing wrong? Do I have to reference a different assembly in the namespace declaration?
Last edited by Basp on 07 Aug 2014, 09:00, edited 1 time in total.
 
wckdspn
Posts: 67
Joined: 18 Aug 2012, 23:14

Re: Ignoring unknown type 'mscorlib.Double'

06 Aug 2014, 23:49

Noesis binds Singles not doubles.
 
Basp
Topic Author
Posts: 22
Joined: 08 May 2014, 10:09

Re: Ignoring unknown type 'mscorlib.Double'

07 Aug 2014, 08:59

If I make them singles, I just get "Ignoring unknown type 'mscorlib.Single'. Also then Blend and Visual Studio complain that you can't apply an object of the type Single to a property that expects the type Double.
 
User avatar
sfernandez
Site Admin
Posts: 1912
Joined: 22 Dec 2011, 19:20

Re: [Unity] Ignoring unknown type 'mscorlib.Double'

07 Aug 2014, 14:26

Hi,

The problem is not using Singles instead of Doubles. The problem is that our parser does not have support for this System type (only Boolean and String are correctly parsed by now).

We will add Double (and other numeric types) in the following release. Sorry for the inconvenience. :(
 
Basp
Topic Author
Posts: 22
Joined: 08 May 2014, 10:09

Re: [Unity] Ignoring unknown type 'mscorlib.Double'

07 Aug 2014, 14:44

Thanks, then I know I can stop looking for a way to get this to work. I can make do with a workaround for now. Thanks for the information!
 
User avatar
sfernandez
Site Admin
Posts: 1912
Joined: 22 Dec 2011, 19:20

Re: [Unity] Ignoring unknown type 'mscorlib.Double'

07 Aug 2014, 14:51

Maybe you can define some Styles to set these default values.

Who is online

Users browsing this forum: No registered users and 1 guest