private void ColorGrid_OnColorPatchLeftClick(object sender, ColorPatchRoutedEventArgs e) { if (Keyboard.IsKeyDown(Key.LeftAlt) || Keyboard.IsKeyDown(Key.RightAlt)) { MessageBus.Publish(new ChangeBackgroundColorCommand(e.ColorPatch.Color.ToGlyphColor())); } else { MessageBus.Publish(new ChangeForegroundColorCommand(e.ColorPatch.Color.ToGlyphColor())); } }
private void ColorGrid_OnColorPatchRightClick(object sender, ColorPatchRoutedEventArgs e) { _contextMenuColorPatch = e.ColorPatch; OpenColorPatchContextMenu(); }