Active Sections

The following article describes the ActiveSections property / feature of the RadColorEditor. It gives you the ability to combine/remove different parts of the ColorEditor.

ActiveSections

Since Q2 2012 SP, RadColorEditor provides ActiveSections property of type ActiveSectionTypes which is a flag enum with the following possible values:

  • SaturationValuePad [1]

  • HueSaturationPad [2]

  • HuePad [3]

  • LuminancePad [4]

  • ColorModesPanel [5]

active Sections

The default value of ActiveSections is SaturationValuePad | HuePad | ColorModesPanel.

So How to use the ActiveSections property?

In XAML , just list your ActiveSections with comma, for example like so:

XAML

<telerik:RadColorEditor  ActiveSections="HuePad, ColorModesPanel" />

This code produces the following result:

active Sections 2

In code behind you have to use the bitwise or:

C

this.colorEditor.ActiveSections = ActiveSectionTypes.HueSaturationPad | ActiveSectionTypes.LuminancePad | ActiveSectionTypes.ColorModesPanel;

VB

Me.colorEditor.ActiveSections = ActiveSectionTypes.HueSaturationPad Or ActiveSectionTypes.LuminancePad Or ActiveSectionTypes.ColorModesPanel        

active Sections 3

An important note here is that you cannot use every combination of the 5 section types. The rule is: you can use one or none between [1,2] and/or one or none between[3, 4] and/or one or none of [5]. If you use both SaturationValuePad and HueSaturationPan only the SaturationValuaPad will be visible. If you use both HuePad and LuminancePad only the HuePad will be visible.

In this article
Not finding the help you need? Improve this article