Center Property
Collapse the table of content
Expand the table of content

RadialGradientBrush.Center Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

public Point Center { get; set; }
<RadialGradientBrush Center="x,y"/>

XAML Values


The X value of the Point that specifies the brush center.


The Y value of a Point that specifies the brush center.

Property Value

Type: System.Windows.Point
The two-dimensional point located at the center of the radial gradient. The default value is a Point with value 0.5,0.5.

Dependency property identifier field: CenterProperty

When the mapping mode is RelativeToBoundingBox (the default), Center and GradientOrigin are "logical points", where values between 0 and 1 are mapped against the total size of the eventual bounding box where the brush is applied, and so the 0.5,0.5 value sets the center and gradient origin to the logical center of the bounding box. If the mapping mode is Absolute, then Center should be given as a true point value in the coordinate system.

The XAML syntax for this property specifies a new Point as a string. The delimiter between the x and y values of the point can be either a comma or a space. Note that the comma usage has potential to clash with the usage of comma as the decimal point in some UI cultures. For more information, see the "XAML Attribute Syntax" section of Point. Also read Remarks in this topic regarding whether Center should be given as a coordinate space point or a logical point.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2016 Microsoft