peterh
Topic Author
Posts: 21
Joined: 13 Mar 2015, 13:50

DependencyProperty with double type.

10 Nov 2015, 13:40

I am trying to declare a DependencyProperty:
public static DependencyProperty BatteryLevelProperty =
            DependencyProperty.Register("BatteryLevel",
                                        typeof(double),
                                        typeof(BatteryIndicator),
                                        new PropertyMetadata(0, OnBatteryLevelChangedCallback));
But when building Noesis fails with the error message:
ApplicationException: Reflection TypeId 'System.Double' for type 'System.Double' already used to register type '.?AVSystemDouble@Gui@Noesis@@'
If I change the type of the property to float instead, it seems to work without issue. When I digged around a bit in the Noesis code for answers, I discovered that it seems like double is not supported (in e.g. NoesisExtend.cs).
How come?

I am using Noesis with Unity.
 
User avatar
jsantos
Site Admin
Posts: 2900
Joined: 20 Jan 2012, 17:18
Contact:

Re: DependencyProperty with double type.

12 Nov 2015, 02:49

For performance reasons (specially on mobile architectures) we implement all the real properties as floats in NoesisGUI. I recommend you doing that.

But I think we should allow creating dependency properties (in the same way we allow data binding to doubles) of type double, or at least give a better error message.

Could you please report it?

Thanks for your feedback.

Who is online

Users browsing this forum: No registered users and 1 guest