Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

WPF color picker

// install Extended.Wpf.Toolkit

xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"

<xctk:ColorPicker Name="ClrPcker_Background" SelectedColorChanged="ClrPcker_Background_SelectedColorChanged"></xctk:ColorPicker>

private void ClrPcker_Background_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs<Color> e)
{
    TextBox.Text = "#" + ClrPcker_Background.SelectedColor.R.ToString() + ClrPcker_Background.SelectedColor.G.ToString() + ClrPcker_Background.SelectedColor.B.ToString();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #WPF #color #picker
ADD COMMENT
Topic
Name
4+8 =