private async void ColorPointRadioButton_DoubleTapped(object sender, RoutedEventArgs e) { ContentDialog dialog = GetCurrentContentDialog(); if (dialog != null) { dialog.Hide(); } ColorPickerDialog colorPickerDialog = new ColorPickerDialog(m_ColorPointModel.Color); await colorPickerDialog.ShowAsync(); if (colorPickerDialog.ColorPickerResult) { m_ColorPointModel.Color = colorPickerDialog.CurrentColor; ColorPatternViewModel.Self.OnCustomizeChanged(); } if (dialog != null) { await dialog.ShowAsync(); } else { MainPage.Self.ShowDeviceUpdateDialogOrNot(); } }
public async Task <bool> CreateNewColor() { var dialog = new ColorPickerDialog(Model.Color); if (await dialog.ShowAsync() != ContentDialogResult.Secondary) { return(false); } Model.SetColor(dialog.Color.R, dialog.Color.G, dialog.Color.B, dialog.Color.A); return(true); }
public async Task <Color> OpenColorPickerWindow(Color c) { ColorPickerDialog colorPickerDialog = new ColorPickerDialog(c); await colorPickerDialog.ShowAsync(); if (colorPickerDialog.ColorPickerResult) { return(colorPickerDialog.CurrentColor); } else { return(colorPickerDialog.PreColor); } }
public async Task <Color> OpenColorPickerWindow(Color c, string ColorBgName) { ColorPickerDialog colorPickerDialog = new ColorPickerDialog(c); await colorPickerDialog.ShowAsync(); if (colorPickerDialog.ColorPickerResult) { ReUndoManager.Store(new ColorChangeCommand(LayerPage.Self.CheckedEffect, ColorBgName, colorPickerDialog.PreColor, colorPickerDialog.CurrentColor)); return(colorPickerDialog.CurrentColor); } else { return(colorPickerDialog.PreColor); } }