private void ToggleMute_Click(object sender, RoutedEventArgs e) { VMVolume model = DataContext as VMVolume; if (model != null) { model.ToggleMute(); } }
private void VolumeUp_Click(object sender, RoutedEventArgs e) { VMVolume model = DataContext as VMVolume; if (model != null) { model.VolumeUp(); } }
private void Slider_PreviewMouseUp(object sender, MouseButtonEventArgs e) { if (PreviousValue != volSlider.Value) { VMVolume model = DataContext as VMVolume; if (model != null) { model.ChangeVolume(volSlider.Value); } } }
public VolumeControl() { InitializeComponent(); vmVolume = new VMVolume(); DataContext = vmVolume; }