Example #1
0
        private void button9_Click(object sender, RoutedEventArgs e)
        {
            ColorSetWindow dlg = new ColorSetWindow();

            dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
            Color item = custColorList[9];

            dlg.SetColor(item);
            if (dlg.ShowDialog() == true)
            {
                dlg.GetColor(ref item);
                custColorList[9] = item;
                backColor9.Color = custColorList[0x09];
            }
        }
Example #2
0
        private void button_colorTitle2_Click(object sender, RoutedEventArgs e)
        {
            ColorSetWindow dlg = new ColorSetWindow();

            dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
            Color item = custTitleColor2;

            dlg.SetColor(item);
            if (dlg.ShowDialog() == true)
            {
                dlg.GetColor(ref item);
                custTitleColor2   = item;
                titleColor2.Color = custTitleColor2;
            }
        }
Example #3
0
        private void button_Color_Click(object sender, RoutedEventArgs e)
        {
            var btn = sender as Button;

            var dlg = new ColorSetWindow();

            dlg.Owner = CommonUtil.GetTopWindow(this);
            Color item = (btn.Background as SolidColorBrush).Color;

            dlg.SetColor(item);
            if (dlg.ShowDialog() == true)
            {
                dlg.GetColor(ref item);
                (btn.Background as SolidColorBrush).Color = item;
            }
        }