Mega Code Archive
From ScRGB values in the Color structure
//File:Window.xaml.cs
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Shapes;
namespace WpfApplication1
{
public partial class SolidColorBrushExample : Window
{
public SolidColorBrushExample()
{
InitializeComponent();
SolidColorBrush brush = new SolidColorBrush();
// From ScRGB values in the Color structure:
brush = new SolidColorBrush(Color.FromScRgb(0.5f, 0.7f, 0.0f, 0.5f));
rect4.Fill = brush;
}
}
}