creating-wpf-brushes

Solid

Creates WPF Brush patterns including SolidColorBrush, LinearGradientBrush, RadialGradientBrush, ImageBrush, and VisualBrush. Use when filling shapes with colors, gradients, images, or tile patterns.

Data & Documents 40 stars 6 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
54
Recency 20%
100
Frontmatter 20%
40
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# WPF Brush Patterns Brush types for filling shapes and backgrounds in WPF. ## 1. Brush Hierarchy ``` Brush (abstract) ├── SolidColorBrush ← Single color ├── GradientBrush │ ├── LinearGradientBrush ← Linear gradient │ └── RadialGradientBrush ← Radial gradient ├── TileBrush │ ├── ImageBrush ← Image fill │ ├── DrawingBrush ← Drawing fill │ └── VisualBrush ← Visual element fill └── BitmapCacheBrush ← Cached visual ``` --- ## 2. SolidColorBrush ```xml <!-- Inline color name --> <Rectangle Fill="Blue"/> <!-- Hex color --> <Rectangle Fill="#FF2196F3"/> <!-- With opacity --> <Rectangle> <Rectangle.Fill> <SolidColorBrush Color="Blue" Opacity="0.5"/> </Rectangle.Fill> </Rectangle> ``` ```csharp // Code creation var brush = new SolidColorBrush(Colors.Blue); brush.Opacity = 0.5; brush.Freeze(); // Performance optimization ``` --- ## 3. LinearGradientBrush ```xml <!-- Horizontal gradient (default) --> <Rectangle Width="200" Height="100"> <Rectangle.Fill> <LinearGradientBrush StartPoint="0,0" EndPoint="1,0"> <GradientStop Color="#2196F3" Offset="0"/> <GradientStop Color="#FF9800" Offset="1"/> </LinearGradientBrush> </Rectangle.Fill> </Rectangle> <!-- Diagonal gradient --> <Rectangle.Fill> <LinearGradientBrush StartPoint="0,0" EndPoint="1,1"> <GradientStop Color="#2196F3" Offset="0"/> <GradientStop Color="#4CAF50" Offset="0.5"/> <GradientStop Color="#...

Details

Author
christian289
Repository
christian289/dotnet-with-claudecode
Created
7 months ago
Last Updated
6 days ago
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category