SIGN UP MEMBER LOGIN:    
ARTICLE

Color Picker in XAML Silverlight

Posted by Abhimanyu Kumar Vatsa Articles | Silverlight with C# April 19, 2011
This article is about using a color picker in XAML Silverlight.
Reader Level:

Introduction

 

In Silverlight, a color picker is a very useful component of Blend. It allows selecting any color in a verity of ways, and provides visual feedback when we use it. A color picker is also used to create gradients.


image002.jpg


The OpacityMask property is used to set which kinds of brush you want to use on the selected element. With the fill property selected, select the first tab on the left; the one which has "No Brush" tooltip.

 

If you select this tab, notice how the background color of the shape disappears. If you select the second tab with the tooltip "Solid Color Brush", you can use the color picker to drag the small dot. Using the vertical slider on the immediate right of the color picker you can display another color group.

 

If you want you can set the R, G, B and A components of the color directly by writing the hexadecimal code in the box. You can also type the color name like "red" in the box instead of the hexadecimal code but it will be good to use hexadecimal ssince there are not names for every mixed color. However if you type the name of the color then it will automatically converted into the hexadecimal form.

 

If you want to use another color selecting system then click on the letter R, G or B to display a choice; here you can choose between HLS (Hue/Lightness/Saturation), HSB (Hue/Saturation/Brightness), RGB (Red/Green/Blue) or CMYK (Cyan/Megenta/Yellow/Black).


image004.jpg


Be tuned for the next article.

 

HAVE A HAPPY CODING!!

Login to add your contents and source code to this article
share this article :
post comment
 

i'm sorry but this is a tiny post and only mean to let intro about color picker.

Posted by Abhimanyu Kumar Vatsa Apr 19, 2011

You have to put some code also....

Posted by Manish Tewatia Apr 19, 2011
Team Foundation Server Hosting
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor