开发者

WPF/Ribbon: Any control like color picker? How to create a simple 1?

wh开发者_Python百科at control can i use to allow users to select color.

or else how would a simple one be created. since this is just a practice project


The latest drop of the open source Extended WPF Toolkit project out on CodePlex includes a color picker. If you are using .NET 4.0 I would recommend giving it a try.


I don't fully understand what do You mean by "allow user to select color" so two i have two solutions for You.

First You can use the color dialog for color selection

ColorDialog colorDialog = new ColorDialog(); 
if ( colorDialog.ShowDialog() != DialogResult.Cancel )
{ 
   textBox.ForeColor = colorDialog.Color;
}

or get familiar with this sample ColorPicke Custome Control

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜