ColorPicker > Quick Start: ColorPicker for Silverlight > Step 1 of 4: Setting up the Application |
In this step you'll create a Silverlight application in Microsoft Expression Blend using ColorPicker for Silverlight. When you add a C1ColorPicker control to your application, you'll have a complete, functional color input selector. To set up your project and add C1ColorPicker controls to your application, complete the following steps:
<Rectangle x:Name="rc1" Width="Auto" Height="Auto"></Rectangle>
The rectangle will now fill the Grid.
XAML |
Copy Code
|
---|---|
<Rectangle x:Name="rc1" Height="Auto" Width="Auto"> <Rectangle.Fill> <LinearGradientBrush x:Name="colors"> <GradientStop x:Name="col1" Color="Black" Offset="0" /> <GradientStop x:Name="col2" Color="White" Offset="1" /> </LinearGradientBrush> </Rectangle.Fill> </Rectangle> |
This will add a black and while linear gradient fill to the rectangle. The design view of the page should now look similar to the following image:
You've successfully created a Silverlight application and customized the Rectangle control. In the next step you'll add and customize C1ColorPicker controls.