private void OkButton_Click(object sender, RoutedEventArgs e)
 {
     DialogResult = true;
     colorPalette.Copy(colorPaletteCopy);
     colorPalette.PaletteName = ColorPaletteNameBlock.Text;
     Close();
 }
 public ColorPalettePicker(ColorPalette colorPalette)
 {
     this.colorPalette = colorPalette;
     colorPaletteCopy  = new ColorPalette();
     colorPaletteCopy.Copy(colorPalette);
     InitializeComponent();
     SetColorRects();
 }