Page 1 of 1

[Unity] Ignoring unknown type 'mscorlib.Double'

Posted: 06 Aug 2014, 16:02
by Basp
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?

Re: Ignoring unknown type 'mscorlib.Double'

Posted: 06 Aug 2014, 23:49
by wckdspn
Noesis binds Singles not doubles.

Re: Ignoring unknown type 'mscorlib.Double'

Posted: 07 Aug 2014, 08:59
by Basp
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.

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

Posted: 07 Aug 2014, 14:26
by sfernandez
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. :(

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

Posted: 07 Aug 2014, 14:44
by Basp
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!

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

Posted: 07 Aug 2014, 14:51
by sfernandez
Maybe you can define some Styles to set these default values.