Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Center Property (RadialGradientBrush)

Gets or sets the center of the outermost circle of the radial gradient.

<object Center="Point" .../>
value = object.Center
object.Center = value

Property Value


The two-dimensional point located at the center of the radial gradient.

This property is read/write. The default value is a point with value 0.5,0.5.


The default central point location of the gradient circle is (0.5, 0.5).

See remarks in Point for scripting usages of this property.

Specifying Relative or Absolute Values

The MappingMode property of a RadialGradientBrush determines whether its coordinate properties are interpreted as a relative or absolute value. By default, Center is treated as relative, which corresponds to a MappingMode of RelativeToBoundingBox. A MappingMode of Absolute specifies that the Center value is expressed in device independent pixels, not as a factor within the bounding box of the area where the brush is applied.


The following XAML example shows some RadialGradientBrush attribute usages.


  <!-- This rectangle is painted with a radial gradient. -->
  <Rectangle Width="200" Height="100">
      <RadialGradientBrush GradientOrigin="0.5,0.5" Center="0.5,0.5"
        RadiusX="0.5" RadiusY="0.5">
        <GradientStop Color="Yellow" Offset="0" />
        <GradientStop Color="Red" Offset="0.25" />
        <GradientStop Color="Blue" Offset="0.75" />
        <GradientStop Color="LimeGreen" Offset="1" />

Applies To


See Also

LinearGradientBrush, Silverlight Brushes Overview

Community Additions

© 2015 Microsoft