Customizing the Color Selector With Styles
The Color Selector control can be skinned using the standard Silverlight 2 method of setting Styles in the App.xaml file of your Silverlight project.
Example of how to Apply a Skin to the Color Selector
These styles are placed in your XAML and referred to using the Style property:
<Style TargetType="local:ColorSelector">
<Setter Property="Width" Value="50" />
<Setter Property="Height" Value="23" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:ColorSelector">
<local:DropDown x:Name="RootElement">
<local:DropDown.SelectedItemContent>
<local:ColorItem x:Name="ElementSelectedColor" IsHitTestVisible="False" />
</local:DropDown.SelectedItemContent>
<local:ItemViewer x:Name="ElementViewer" Width="168" VerticalAlignment="Top" VerticalScrollBarVisibility="Hidden" />
</local:DropDown>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
As you can see, styling is a powerful method of customizing the controls to suite the look and feel of your Silverlight application.