I\'ve slider that its value is bind to some property, and the property updates it all the time. While dragging the [thumb on] slider I want to stop this update value of slider f
Hi this solution works for me. Just override Slider class and bind to FinalValue in xaml.
public class ExSlider : Slider
{
public double FinalValue
{
get { return (double)GetValue(FinalValueProperty); }
set { SetValue(FinalValueProperty, value); }
}
public static readonly DependencyProperty FinalValueProperty =
DependencyProperty.Register(
"FinalValue", typeof(double), typeof(ExSlider),
new FrameworkPropertyMetadata(0d,
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
protected override void OnThumbDragCompleted(DragCompletedEventArgs e)
{
base.OnThumbDragCompleted(e);
FinalValue = Value;
}
}