New to Telerik UI for WPF? Download free 30-day trial

Color History

The RadColorEditor control enables you to keep track of the previously selected colors through a set of properties.

  • PreviousColor: This property is of type Color and provides access to the last selected color.

  • ColorHistory: This property exposes a collection of all previously selected colors.

        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> 
                <telerik:ColorToBrushConverter x:Key="ColorConverter" /> 
            <telerik:RadColorEditor x:Name="colorEditor1" Width="400" Height="220" HistoryCapacity="5" /> 
            <ItemsControl ItemsSource="{Binding ColorHistory, ElementName=colorEditor1}" Height="20" Margin="8 0"> 
                        <Border Width="20" Height="20" Margin="5 0" 
                                Background="{Binding Converter={StaticResource ColorConverter} }" /> 
                        <telerik:RadWrapPanel /> 
  • HistoryCapacity: This property is of type int. It gets/set the number of previously used colors to be stored in the ColorHistory collection.

See Also

In this article