Changing the Background Color

The Background property gets or sets the value of the C1ColorPicker control's background color. By default the C1ColorPicker control starts with the Background property unset, but you can customize this at design time in Microsoft Expression Blend, in XAML, and in code.

At Design Time in Blend

To set the Background property at run time, complete the following steps:

1.   Click the C1ColorPicker control once to select it.

2.   Navigate to the tab window and click the Background item.

3.   Click the Solid Color brush tab, and choose Red or another color in the color picker.

This will set the Background property to the color you chose

In XAML

For example, to set the Background property to Red add Background="Red" to the <c1: C1ColorPicker> tag so that it appears similar to the following:

<c1:C1ColorPicker Name="C1ColorPicker1" Margin="296,98,273,0" Height="45" VerticalAlignment="Top" Background="Red"/>

In Code

For example, to set the Background property to Red, add the following code to your project:

      Visual Basic

      C#

Run the application and observe:

The background of the C1ColorPicker control will appear red:

 


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.