Exemple #1
0
 private void ColorPicker_ColorPicked(object sender, ColorPickedEventArgs e)
 {
     PickedColorGrid.Background = new SolidColorBrush(e.Color);
     if (e.IsSystemAccent)
     {
         Context.SetColor(Colors.Transparent);
         App.ChangeThemeColor((Color)App.Current.Resources["SystemAccentColor"]);
         App.MainColor = (Color)App.Current.Resources["SystemAccentColor"];
     }
     else
     {
         Context.SetColor(e.Color);
         App.ChangeThemeColor(e.Color);
         App.MainColor = e.Color;
     }
 }
 void ColorPicker_OnColorPicked(object sender, ColorPickedEventArgs e)
 {
     if (sender == textColorPicker)
     {
         Button.TextColor               = e.Color;
         DatePicker.TextColor           = e.Color;
         Editor.TextColor               = e.Color;
         Entry.TextColor                = e.Color;
         PlaceholderEntry.TextColor     = e.Color;
         PlaceholderEditor.TextColor    = e.Color;
         Label.TextColor                = e.Color;
         Picker.TextColor               = e.Color;
         SearchBar.TextColor            = e.Color;
         PlaceholderSearchBar.TextColor = e.Color;
         TimePicker.TextColor           = e.Color;
         Span.TextColor = e.Color;
     }
     else
     {
         PlaceholderEntry.PlaceholderColor     = e.Color;
         PlaceholderEditor.PlaceholderColor    = e.Color;
         PlaceholderSearchBar.PlaceholderColor = e.Color;
     }
 }