Silverlight Set Color

Source: Internet
Author: User
Tags transparent color silverlight

Transparent color:00ff00ff

Set the color of a bar chart
Colorset cs = new Colorset ();
Cs. Id = "Colorset1";

#region set the color of the histogram to be developed
string strcolor = Oyaxis.color;
Switch (Strcolor)
{
Case "Red":
Cs. Brushes.add (New SolidColorBrush (Color.FromArgb (0xFF, 0xFF, 0x45, 0x00)); #FFFF4500 orangered
Break
Case "Yellow":
Cs. Brushes.add (New SolidColorBrush (Color.FromArgb (0xFF, 0xDA, 0xa5, 0x20));//ffdaa520 Goldenrod
Break
Case "Orange":
Cs. Brushes.add (New SolidColorBrush (Colors.orange));
Break
Case "Green":
Cs. Brushes.add (New SolidColorBrush (Colors.green));
Break
Case "Blue":
Cs. Brushes.add (New SolidColorBrush (Color.FromArgb (0xFF, 0x41, 0x69, 0xe1))); Ff4169e1 Royalblue
Break
Case ' white ':
Cs. Brushes.add (New SolidColorBrush (Color.FromArgb (0xFF, 0xFF, 0xFF, 0xff))); FFFFFFFF royalblue Color.FromArgb (0xFF, 0xFF, 0xFF, 0xff) transparent color; 00ff00ff
Break
Default
Break
}
#endregion

#region set the Chart to use the custom color collection Colorset1
if (CS. Brushes.count > 0)
{
Chart. Colorsets.clear ();
Chart. Colorsets.add (CS);
Chart. Colorset = "Colorset1";
}
# endregion

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.