Answers for "WPF color picker"

0

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();
}
Posted by: Guest on June-14-2021

Browse Popular Code Answers by Language