internal void RaiseUnchecked(RoutedEventArgs args) { if ((ButtonType == ButtonTypes.Toggle) && !IsFullScreen) { Unchecked?.Invoke(this, args); } }
private void ToggleButton_PropertyChanged(object sender, AvaloniaPropertyChangedEventArgs e) { if (e.Property.Name == nameof(ToggleButton.IsChecked)) { if ((bool)e.NewValue) { var command = this.CheckedCommand; var commandParameter = this.CheckedCommandParameter ?? this; if (command != null && command.CanExecute(commandParameter)) { command.Execute(commandParameter); } Checked?.Invoke(this, new RoutedEventArgs()); } else { var command = this.UnCheckedCommand; var commandParameter = this.UnCheckedCommandParameter ?? this; if (command != null && command.CanExecute(commandParameter)) { command.Execute(commandParameter); } Unchecked?.Invoke(this, new RoutedEventArgs()); } } }
public override void OnMouseUp(MouseEventArgs e) { if (Enabled && Pressed) { if (InteractiveBounds.Contains(e.Position)) { Pressed = false; if (IsChecked) { IsChecked = false; UpdateStyle(); Unchecked?.Invoke(this, EventArgs.Empty); return; } if (!IsChecked) { IsChecked = true; UpdateStyle(); Checked?.Invoke(this, EventArgs.Empty); return; } } } }
private void CheckBoxUnChecked(object sender, RoutedEventArgs e) { if (Unchecked != null) { Unchecked.Invoke(DataContext, e); } }
protected virtual void OnIsCheckedChanged(bool?oldValue, bool?newValue) { if (newValue.HasValue && newValue.Value) { Checked?.Invoke(this, new RoutedEventArgs()); } else { Unchecked?.Invoke(this, new RoutedEventArgs()); } }
void Notify(bool val) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("IsChecked")); if (val) { Checked?.Invoke(); } else { Unchecked?.Invoke(); } }
private protected virtual void OnUnchecked() { UpdateVisualState(); // Create the args var args = new RoutedEventArgs(); args.OriginalSource = this; // Raise the event Unchecked?.Invoke(this, args); }
private void UncheckedHandler(object sender, RoutedEventArgs e) { var command = this.UnCheckedCommand; var commandParameter = this.UnCheckedCommandParameter ?? this; if (command != null && command.CanExecute(commandParameter)) { command.Execute(commandParameter); } Unchecked?.Invoke(this, e); }
private void ToggleButton_OnClick(object sender, RoutedEventArgs e) { if (ToggleButton.IsChecked.Value) { AutoCloseNotificationBar.Show(CheckedMessage); Checked?.Invoke(this, null); ToggleButton.ToolTip = CheckedTooltip; } else { AutoCloseNotificationBar.Show(UncheckedMessage); Unchecked?.Invoke(this, null); ToggleButton.ToolTip = UncheckedTooltip; } }
private void ToggleGrid_MouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e) { if (checkbox.IsChecked == true) { checkbox.IsChecked = false; IsChecked = false; Unchecked?.Invoke(this, EventArgs.Empty); } else { checkbox.IsChecked = true; IsChecked = true; Checked?.Invoke(this, EventArgs.Empty); } StateChanged?.Invoke(this, EventArgs.Empty); }
protected void InvokeUnchecked(RoutedEventArgs e) { Unchecked?.Invoke(this, e); }
internal void RaiseUnchecked(RoutedEventArgs args) { Unchecked?.Invoke(this, args); }
private void UwpControl_Unchecked(object sender, Windows.UI.Xaml.RoutedEventArgs e) { Unchecked?.Invoke(this, EventArgs.Empty); }
protected virtual void OnUnchecked() { Unchecked?.Invoke(this, RoutedEventArgsFactory.Create(this)); }
/// <summary> /// /// </summary> protected virtual void OnUnchecked() { Unchecked?.Invoke(this, new EventArgs()); }
protected virtual void OnUnchecked(EventArgs e) { Unchecked?.Invoke(this, e); }