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;