Stroke Property
Gets or sets the Brush that specifies how to paint the Shape outline.
XAML | |
Scripting |
value = object.Stroke object.Stroke = value |
Color | The Color for a SolidColorBrush expressed as an attribute string. See Color. |
Brush | Within opening and closing property elements for object.Stroke, exactly one object element for an object that derives from Brush. The object element can be one of the following: LinearGradientBrush, RadialGradientBrush, ImageBrush, SolidColorBrush, VideoBrush. |
A Brush that specifies how the Shape outline is painted.
This property is read/write. The default value is null.
Setting the Stroke for a line (Line or Polyline) defines its entire brush-defined appearance. Setting Fill for a line has no effect.
Some brush types (SolidColorBrush) support a XAML attribute syntax, whereas other brush types (ImageBrush, LinearGradientBrush, RadialGradientBrush) only support an object element syntax. This is why two versions of XAML syntax are shown for this property.
Ellipse, Line, Path, Polygon, Polyline, Rectangle, Shape
Shapes Overview
Silverlight Brushes Overview
Object Layout in Silverlight