DependencyProperty with double type.
I am trying to declare a DependencyProperty:
But when building Noesis fails with the error message:
How come?
I am using Noesis with Unity.
Code: Select all
public static DependencyProperty BatteryLevelProperty =
DependencyProperty.Register("BatteryLevel",
typeof(double),
typeof(BatteryIndicator),
new PropertyMetadata(0, OnBatteryLevelChangedCallback));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).ApplicationException: Reflection TypeId 'System.Double' for type 'System.Double' already used to register type '.?AVSystemDouble@Gui@Noesis@@'
How come?
I am using Noesis with Unity.
Re: DependencyProperty with double type.
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.
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: Semrush [Bot] and 9 guests