Skip to content

Taldrit78/ag.WPF.ColorPicker

 
 

Repository files navigation

ag.WPF.ColorPicker

Nuget

Custom WPF controls that allows a user to pick a color from a predefind color palettes and screen.

Installation

Use NuGet package manager.

ag.WPF.ColorPicker

Usage

Add ag.WPF.ColorPicker namespace to XAML file:

xmlns:picker="clr-namespace:ag.WPF.ColorPicker;assembly=ag.WPF.ColorPicker"

Add ColorPicker

<picker:ColorPicker x:Name="_picker" Width="175" VerticalAlignment="Top" Grid.Column="0" Margin="20" SelectedColorChanged="_picker_SelectedColorChanged"/>

Elsewhere in code behind

private void _picker_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs<Color> e) => Background = new SolidColorBrush(e.NewValue);

Enumerations

PanelView

Represents available ColorPanel views

Field Value Description
Standard 0 Standard view with full controls set available
Simple 1 Simple minimalistic view

ColorPicker

ColorPicker

ColorPicker

Simple ColorPicker
Simple

Styled ColorPicker
Styled

Properties

Property Type Description Default value
SelectedColor Color Gets or sets selected color Red
ColorString string Gets selected color's string representation
ButtonVisible bool Gets or sets the visibility of the Button

Events

Event Description Remarks
SelectedColorChanged Occurrs when SelectedColor property is changed OldValue field of RoutedPropertyChangedEventArgs contains an initial color. NewValue of RoutedPropertyChangedEventArgs contains a new color.

ColorPanel

ColorPanel

Properties

Property Type Description Default value
SelectedColor Color Gets or sets selected color Red
ColorString string Gets selected color's string representation

Attached properties

Property Type Description Default value
PanelView PanelView Gets or sets a value that indicates the view of ColorPanel PanelView.Standard
TitleCancel string Gets or sets a value that indicates the title of Cancel button Cancel
TitleApply string Gets or sets a value that indicates the title of Apply button Apply
TitleShadesAndTints string Gets or sets a value that indicates the title of Shades and tints group box Shades and tints
TitleColorModes string Gets or sets a value that indicates the title of Color modes group box Color modes
TitleFormat string Gets or sets a value that indicates the title of Format text box Format
TitleTabStandard string Gets or sets a value that indicates the title of Standard tab Standard
TitleTabBasic string Gets or sets a value that indicates the title of Basic tab Basic
TitleTabCustom string Gets or sets a value that indicates the title of Custom tab Custom

Events

Event Description Remarks
SelectedColorChanged Occurrs when SelectedColor property is changed OldValue field of RoutedPropertyChangedEventArgs contains an initial color. NewValue of RoutedPropertyChangedEventArgs contains a new color.

About

ButtonVisibility

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%