ColorLegend

This control manages color collection. It can hide/show, select and change colors.

Inherits from System.Windows.Controls.HeaderedContentControl.

ColorLegend 01

Properties

Property nameDescription
AccentColorBrushGet or sets accent color
AllowColorEditingGets or sets a whether color can be edited.
EditingColorGets or sets whether user editing current color.
FilterGets or sets filter for list of color.
FilteredItemsIdsGets or sets the filtered items ids.
FilteredItemsSourceGets or sets a source for color items respecting current filter value.
FilterWatermarkGets or sets filter watermark string we use in search textbox.
ItemsSourceGets or sets source for color items.
IsAllVisibleGets or sets whether is all visible.
IsColorSelectingGets or sets whether user editing current color.
SelectedColorItemsGets or sets list of selected items.
ShowBottomToolBoxGets or sets whether bottom tool box is visible.
ShowColorVisibilityControlsGets or sets whether visibility controls are visible.
ShowSearchBoxGets or sets whether search box is visible.
ShowSettingsBoxGets or sets whether settings button is visible.
ShowToolBoxGets or sets whether tool box is visible.
OperationColorAttribute Will be removed in v2.0!Gets or sets the operation color attribute.
ShowSettings Will be removed in v2.0!Gets or sets whether settings button is visible.
UseRegexFiltering Will be removed in v2.0!Gets or sets whether regex is used when search is performed.

Events

Event nameDescription
SelectionChangedOccurs when selected color item changed

How to use

When using the ColorLegend in data binding scenarios, bind your color items collection to ItemsSource property. You can show/hide ToolBox, BottomToolBox, ColorVisibilityControls, SearchBox, SettingsBox by setting the appropriate flags. Bind to SelectedColorItems property to get current selection. Because the ColorLegend is inherits from the HeaderedContentControl you can specify its header as shown in the example.

<orc:ColorLegend ItemsSource="{Binding ColorItems}"
                 AllowColorEditing="True"
                 ShowColorVisibilityControls="True"
                 ShowSettingsBox="False"
                 SelectedColorItems="{Binding SelectedColorItems}">
    <orc:ColorLegend.Header>
        <orc:HeaderBar Header="This is ColorLegend header"/>
    </orc:ColorLegend.Header>
</orc:ColorLegend>

Contributions

We would like to thank the following contributors:

Want to contribute to the documentation? We have a guide for that!


Questions

Have a question about Catel or WildGums controls? Use StackOverflow with the Catel tag!