Get WPF Slider value after dragging
<p>I'm trying to get WPF Slider value after the user finishing to drag the thumb or clicking to move to specific point. </p>

<p>i want to save the new value in db by listening to some kind of event. how can i do this?</p>

<p>i tried the solutions on this question but i end up with nothing - 
<a href="https://stackoverflow.com/questions/723502/wpf-slider-with-an-event-that-triggers-after-a-user-drags">WPF: Slider with an event that triggers after a user drags</a></p>

<p>each time it enters the event lots of times</p>

<p>thanks.</p>

<p>xaml:</p>

<pre><code>&lt;Slider Value="{Binding VoipVolume}" MouseLeftButtonUp="slider_MouseLeftButtonUp"/&gt;
</code></pre>

<p>codebehind:</p>

<pre><code>public double VoipVolume
    {
        get { return (double)GetValue(VoipVolumeProperty); }
        set
        {
            SetValue(VoipVolumeProperty, value);
            VolumeChanged(value);
        }
    }

private void VolumeChanged(object value)
    {
        StationViewModel viewModel = this.DataContext as StationViewModel;

        if (viewModel != null)
        {
            if (end)
            {
                viewModel.OnVolumeChange((float)VoipVolume);
                end = false;
            }
        }
    }
    bool end = false;


    private void slider_MouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
    {
        end = true;
    }
</code></pre>