Slider ValueChanged Args can't be double?
I want connect event when slider change value. I have this in C# generated by VisualStudio when I add event in WPF
I create C++ code
But in compile time it throw lot of errors, where is mentioned float. Then I decide change double in to float, and now it compile without error. Why is there used float instead double?
Code: Select all
private void ValueChanged_MSpeed(object sender, RoutedPropertyChangedEventArgs<double> e)
{
}
Code: Select all
bool ConnectEvent(Noesis::BaseComponent* source, const char* event, const char* handler) override
{
// ...
NS_CONNECT_EVENT(Noesis::Slider, ValueChanged, ValueChanged_MSpeed);
return false;
}
void grid_UrhoControl::ValueChanged_MSpeed(Noesis::BaseComponent * object, const Noesis::RoutedPropertyChangedEventArgs<double>& args);
-
sfernandez
Site Admin
- Posts: 2991
- Joined:
Re: Slider ValueChanged Args can't be double?
In Noesis all properties are float for performance reasons.
You can see that in FrameworkElement's Width and Height, RangeBase Value, and many others.
So you will need some conditional code there to use the appropriate signature for Noesis and WPF.
Sorry for the inconveniences.
You can see that in FrameworkElement's Width and Height, RangeBase Value, and many others.
So you will need some conditional code there to use the appropriate signature for Noesis and WPF.
Sorry for the inconveniences.
Re: Slider ValueChanged Args can't be double?
Ok, thanks for explanation. Maybe it should be mentioned in Documentation.
Who is online
Users browsing this forum: Ahrefs [Bot] and 8 guests