Oleg's profileOleg V. Polikarpotchkin ...BlogNetwork Tools Help

Blog


    June 14

    KnownColorPicker Control

    This element is the one more control from the ColorPicker constituent controls bug in addition to the published in my recent posts.

    The KnownColorPicker control is designed as the tool to select the Color from the set of predefined colors. It's the very simple User Control and is developed as the separate entity to encapsulate the predefined color sets initialization code and ListBox and ComboBox controls templates.

    The KnownColorPicker control has two sets of predefined colors. The first one contains 64 colors which we can see in the Windows Common Color Dialog. This set is labeled as "Base Colors" and is presented in the ListBox at the top. The second one contains all the colors defined in the Windows.System.Windows.Media.Colors class. This set is labeled as "All WellKnown Colors" and is presented in the ComboBox at the bottom.

    That is the sample:

    KnownColorPicker

    At the figure above the Bisque border is given to the KnownColorPicker control just to make it distinctive.

    The KnownColorPicker has the SelectedColor Dependency Property used to get or set the value of the Color selected. When the SelectedColor changes the KnownColorPicker raises the SelectedColorChanged event.

    The code

    You can download the code and the samples here:


    The archive contains my WPFGears library with samples, tests, etc. It’s the Visual Studio 2008 SP1 solution targeted to .NET Framework 3.5.

    You’ll find KnownColorPickerSample project there. KnownColorPicker control code is in the WPFGears library project ColorPickerControls folder.

    Regards,
    Oleg V. Polikarpotchkin

    Technorati Теги: ,,

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Trackbacks

    The trackback URL for this entry is:
    http://ov-p.spaces.live.com/blog/cns!39D56F0C7A08D703!326.trak
    Weblogs that reference this entry
    • None