May 2010
Intermediate to advanced
1272 pages
61h 18m
English
LinearGradientBrushA LinearGradientBrush enables applying a gradient color to fill a visual element. Valid targets are the Fill property for geometric shapes—Background and Foreground properties for user controls. The following code draws a Rectangle and demonstrates that the gradient is applied both as background color (Fill property) and as foreground (Stroke):

First, it is worth mentioning that the StrokeThickness property of Rectangle specifies the shape’s border size. Each color in the gradient is represented by a GradientStop element. Its Offset property requires a value from 0 to 1 and specifies the color position in the gradient, ...
Read now
Unlock full access