private void ToggleDayNight()
 {
     if (editingDayPalette)
     {
         SelectedDayPalette = SelectedDayPalette;
     }
     else
     {
         SelectedNightPalette = SelectedNightPalette;
     }
 }
 //Called by the child ColorPaletteStackItem on a click event
 public void HandlePaletteStackItemClicked(ColorPaletteStackItem item)
 {
     if (item != null)
     {
         if (editingDayPalette)
         {
             SelectedDayPalette = item;
         }
         else
         {
             SelectedNightPalette = item;
         }
     }
 }
 private void LoadColorPalettes()
 {
     DisplayedColorPalettes.Children.Clear();
     foreach (var palette in ConfigManager.ColorPalettes.Contents.ColorPaletteList)
     {
         var stackItem = new ColorPaletteStackItem(palette, this)
         {
             NormalBackground      = new SolidColorBrush(Colors.White),
             HighlightedBackground = new SolidColorBrush(Colors.LightBlue),
         };
         DisplayedColorPalettes.Children.Add(stackItem);
         if (palette.Id == Screen.dayColorPaletteId)
         {
             SelectedDayPalette = stackItem;
         }
         if (palette.Id == Screen.nightColorPaletteId)
         {
             SelectedNightPalette = stackItem;
         }
     }
     ToggleDayNight();
 }