ridhdhi vaghani

ridhdhi vaghani

  • NA
  • 95
  • 2.5k

how to open colordialogbox in WPF C#?

Jan 12 2023 10:23 AM

This code is used for Windows applications. Cannot be used in WPF windows :- 

private void part1colorbtn_Click(object sender, RoutedEventArgs e)
        {
            DialogResult result = colorDialog1.ShowDialog();

            if (result == DialogResult.OK)
            {
                part2colorbtn.BackColor = colorDialog1.Color;
            }
        }

 

How to use color dialog box inside WPF windows? Please help me.


Answers (3)