Using Brushes.AliceBlue : Brush « Windows Presentation Foundation « C# / CSharp Tutorial






using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Shapes;


    class MainClass : Window
    {
        [STAThread]
        public static void Main()
        {
            Application app = new Application();
            app.Run(new MainClass());
        }
        public MainClass()
        {
            Ellipse elips = new Ellipse();
            elips.Fill = Brushes.AliceBlue;
            elips.StrokeThickness = 24;     // 1/4 inch
            elips.Stroke = new LinearGradientBrush(Colors.CadetBlue, Colors.Chocolate,new Point(1, 0), new Point(0, 1));
            Content = elips;
        }
    }








24.81.Brush
24.81.1.Set color for SolidColorBrushSet color for SolidColorBrush
24.81.2.Paint with system brushes and colors.Paint with system brushes and colors.
24.81.3.Uses a predefined SolidColorBrush, defined by the System.Windows.Media.Brushes classUses a predefined SolidColorBrush, defined by the System.Windows.Media.Brushes class
24.81.4.Gradient brushes within a DrawingBrush. Two overlapping gradients are layeredGradient brushes within a DrawingBrush. Two overlapping gradients are layered
24.81.5.OpacityMask, LinearGradientBrush, RenderTransformOpacityMask, LinearGradientBrush, RenderTransform
24.81.6.Brush resourceBrush resource
24.81.7.Use a VisualBrush to magnify a portion of the screen.Use a VisualBrush to magnify a portion of the screen.
24.81.8.Predefined brush in Brushes ClassPredefined brush in Brushes Class
24.81.9.Solid Color Brush In Code with predefined brushSolid Color Brush In Code with predefined brush
24.81.10.Solid Color Brush In Code with SolidColorBrushSolid Color Brush In Code with SolidColorBrush
24.81.11.Solid Color Brush In Code with SolidColorBrush and RGB colorSolid Color Brush In Code with SolidColorBrush and RGB color
24.81.12.Get all public static properties from Brush
24.81.13.Change the Window background with a Brush
24.81.14.Using Brushes.AliceBlue
24.81.15.Color map Brush
24.81.16.Create Vector from width and height