コード例 #1
0
ファイル: ColorWell.xaml.cs プロジェクト: Heliflyer/helios
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            ColorPickerDialog dialog = new ColorPickerDialog();
            dialog.StartingColor = Color;
            dialog.Owner = Window.GetWindow(this);

            Nullable<bool> result = dialog.ShowDialog();
            if (result != null && result == true)
            {
                Color = dialog.SelectedColor;
            }
        }
コード例 #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            ColorPickerDialog dialog = new ColorPickerDialog();

            dialog.StartingColor = Color;
            dialog.Owner         = Window.GetWindow(this);

            Nullable <bool> result = dialog.ShowDialog();

            if (result != null && result == true)
            {
                Color = dialog.SelectedColor;
            }
        }