C#颜色对话框(WPF可用)

System.Windows.Forms.ColorDialog colorDialog = new System.Windows.Forms.ColorDialog();
//允许使用该对话框的自定义颜色
colorDialog.AllowFullOpen = true;
colorDialog.FullOpen = true;
colorDialog.ShowHelp = true;
//初始化当前文本框中的字体颜色,
colorDialog.Color = System.Drawing.Color.Black;
//当用户在ColorDialog对话框中点击"取消"按钮
colorDialog.ShowDialog();
string strColor=System.Drawing.ColorTranslator.ToHtml(colorDialog.Color);
this.colorBtn.Content = strColor;

C#颜色对话框(WPF可用)

上一篇:Windows Server2008装FTP服务


下一篇:codeforces#999 E. Reachability from the Capital(图论加边)