This documentation is archived and is not being maintained.
Shape::Fill Property
Visual Studio 2010
Gets or sets the Brush that specifies how the shape's interior is painted.
Assembly: PresentationFramework (in PresentationFramework.dll)
This example shows how to use the Fill property to set the background color of an Ellipse element.
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <StackPanel> <Ellipse Fill="Red" Width="100" Height="100" /> </StackPanel> </Page>
More Code
| How to: Paint an Area with a Solid Color | To paint an area with a solid color, you can use a predefined system brush, such as Red or Blue, or you can create a new SolidColorBrush and describe its Color using alpha, red, green, and blue values. In XAML, you may also paint an area with a solid color by using hexidecimal notation. |
| How to: Paint an Area with an Image | This example shows how to use the ImageBrush class to paint an area with an image. An ImageBrush displays a single image, which is specified by its ImageSource property. |
| How to: Make a UIElement Transparent or Semi-Transparent | This example shows how to make a UIElement transparent or semi-transparent. To make an element transparent or semi-transparent, you set its Opacity property. A value of 0.0 makes the element completely transparent, while a value of 1.0 makes the element completely opaque. A value of 0.5 makes the element 50% opaque, and so on. An element's Opacity is set to 1.0 by default. |
| How to: Animate a Property Without Using a Storyboard | This example shows one way to apply an animation to a property without using a Storyboard. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: