Shape.Fill Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the Brush that specifies how the shape's interior is painted.

Namespace:   System.Windows.Shapes
Assembly:  PresentationFramework (in PresentationFramework.dll)

member Fill : Brush with get, set

Property Value

Type: System.Windows.Media.Brush

A Brush that describes how the shape's interior is painted. The default is null.

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>
No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: