How to connect a slider event
How can I connect a slider event in C# to Noesis ?
The code I have bellow
says
The code I have bellow
Code: Select all
protected override bool ConnectEvent(object source, string eventName, string handlerName)
{
if (eventName == "ValueChanged" && handlerName == "Slider_ValueChanged")
{
((Slider)source).ValueChanged += this.Slider_ValueChanged;
return true;
}
return false;
}
No overload for 'Slider_ValueChanged' matches delegate 'RoutedPropertyChangedEventHandler<float>'
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: How to connect a slider event
In Noesis our properties use float instead of double compared to WPF.
As you can see in our BlendTutorial sample we define the appropriate type depending on the compilation target, Noesis or Blend:
Then use that define in the function signature:
As you can see in our BlendTutorial sample we define the appropriate type depending on the compilation target, Noesis or Blend:
Code: Select all
#if NOESIS
using Noesis;
using Float = System.Single;
#else
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using Float = System.Double;
#endif
Code: Select all
private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<Float> e)
Who is online
Users browsing this forum: No registered users and 92 guests