Пример #1
0
        private void ButtonChangeCustomColor_Click(object sender, RoutedEventArgs e)
        {
            Window_ColorPicker colorp = new Window_ColorPicker(((Rectangle)((StackPanel)((FrameworkElement)sender).Parent).Children[0]).Fill);

            colorp.Owner = Window.GetWindow(this);
            colorp.ShowDialog();
            if (colorp.IsOK() == true)
            {
                ((Rectangle)((StackPanel)((FrameworkElement)sender).Parent).Children[0]).Fill = new SolidColorBrush(colorp.GetColor());
            }
        }
Пример #2
0
        private void ButtonEndColor_Click(object sender, RoutedEventArgs e)
        {
            Window_ColorPicker colorp = new Window_ColorPicker(Rect_EndColor.Fill);

            colorp.Owner = this;
            colorp.ShowDialog();
            if (colorp.IsOK() == true)
            {
                Rect_EndColor.Fill = new SolidColorBrush(colorp.GetColor());
            }
        }
Пример #3
0
        private void ButtonColor_Click(object sender, RoutedEventArgs e)
        {
            Window_ColorPicker colorp = new Window_ColorPicker(Rect_BackColor.Fill);

            colorp.Owner = this;
            colorp.ShowDialog();
            if (colorp.IsOK() == true)
            {
                cont.Background     = new SolidColorBrush(colorp.GetColor());
                Rect_BackColor.Fill = new SolidColorBrush(colorp.GetColor());
                SetCustomBrush();
            }
        }