RadialGradientBrush Class

Definition

Paints an area with a radial gradient. A focal point defines the beginning of the gradient, and a circle defines the end point of the gradient.

public sealed class RadialGradientBrush : System.Windows.Media.GradientBrush
Inheritance

Remarks

The RadialGradientBrush is similar in programming model to the LinearGradientBrush. However, the linear gradient has a start and an end point to define the gradient vector, while the radial gradient has a circle, along with a focal point, to define the gradient behavior. The circle defines the end point of the gradient. In other words, a gradient stop at 1.0 defines the color at the circle's circumference. The focal point defines the center of the gradient. A gradient stop at 0.0 defines the color at the focal point.

The following image shows a rectangle filled with a radial gradient. The radial gradient that goes from white to gray. The outside circle represents the gradient circle while the red dot denotes the focal point. This gradient has its SpreadMethod set to Pad.

A radial gradient with highlighted components
Radial gradient with a highlighted focal point

Note

RadialGradientBrush objects are rendered using hardware acceleration on Tier 2 systems. For more information about hardware tiers, see Graphics Rendering Tiers.

Freezable Features

Because it inherits from the Freezable class, the RadialGradientBrush class provides several special features: RadialGradientBrush objects can be declared as , shared among multiple objects, made read-only to improve performance, cloned, and made thread safe. For more information about the different features provided by Freezable objects, see Freezable Objects Overview.

Constructors

RadialGradientBrush()

Initializes a new instance of the RadialGradientBrush class.

RadialGradientBrush(GradientStopCollection)

Initializes a new instance of the RadialGradientBrush class that has the specified gradient stops.

RadialGradientBrush(Color, Color)

Initializes a new instance of the RadialGradientBrush class with the specified start and stop colors.

Fields

CenterProperty

Identifies the Center dependency property.

GradientOriginProperty

Identifies the GradientOrigin dependency property.

RadiusXProperty

Identifies the RadiusX dependency property.

RadiusYProperty

Identifies the RadiusY dependency property.

Properties

Center

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

GradientOrigin

Gets or sets the location of the two-dimensional focal point that defines the beginning of the gradient.

RadiusX

Gets or sets the horizontal radius of the outermost circle of the radial gradient.

RadiusY

Gets or sets the vertical radius of the outermost circle of a radial gradient.

Methods

Clone()

Creates a modifiable clone of this RadialGradientBrush, making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values.

CloneCurrentValue()

Creates a modifiable clone of this RadialGradientBrush object, making deep copies of this object's current values. Resource references, data bindings, and animations are not copied, but their current values are.

Equals(Object, Object) Inherited from Object
GetType() Inherited from Object
MemberwiseClone() Inherited from Object
ReferenceEquals(Object, Object) Inherited from Object
ClearValue(DependencyProperty) Inherited from DependencyObject
ClearValue(DependencyPropertyKey) Inherited from DependencyObject
CoerceValue(DependencyProperty) Inherited from DependencyObject
DependencyObjectType Inherited from DependencyObject
Equals(Object) Inherited from DependencyObject
GetHashCode() Inherited from DependencyObject
GetLocalValueEnumerator() Inherited from DependencyObject
GetValue(DependencyProperty) Inherited from DependencyObject
InvalidateProperty(DependencyProperty) Inherited from DependencyObject
IsSealed Inherited from DependencyObject
ReadLocalValue(DependencyProperty) Inherited from DependencyObject
SetCurrentValue(DependencyProperty, Object) Inherited from DependencyObject
SetValue(DependencyProperty, Object) Inherited from DependencyObject
SetValue(DependencyPropertyKey, Object) Inherited from DependencyObject
ShouldSerializeProperty(DependencyProperty) Inherited from DependencyObject
CanFreeze Inherited from Freezable
Changed Inherited from Freezable
CloneCore(Freezable) Inherited from Freezable
CloneCurrentValueCore(Freezable) Inherited from Freezable
CreateInstance() Inherited from Freezable
CreateInstanceCore() Inherited from Freezable
Freeze() Inherited from Freezable
Freeze(Freezable, Boolean) Inherited from Freezable
GetAsFrozen() Inherited from Freezable
GetAsFrozenCore(Freezable) Inherited from Freezable
GetCurrentValueAsFrozen() Inherited from Freezable
GetCurrentValueAsFrozenCore(Freezable) Inherited from Freezable
IsFrozen Inherited from Freezable
OnChanged() Inherited from Freezable
OnFreezablePropertyChanged(DependencyObject, DependencyObject) Inherited from Freezable
OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty) Inherited from Freezable
OnPropertyChanged(DependencyPropertyChangedEventArgs) Inherited from Freezable
ReadPreamble() Inherited from Freezable
WritePostscript() Inherited from Freezable
WritePreamble() Inherited from Freezable
ApplyAnimationClock(DependencyProperty, AnimationClock) Inherited from Animatable
ApplyAnimationClock(DependencyProperty, AnimationClock, HandoffBehavior) Inherited from Animatable
BeginAnimation(DependencyProperty, AnimationTimeline) Inherited from Animatable
BeginAnimation(DependencyProperty, AnimationTimeline, HandoffBehavior) Inherited from Animatable
FreezeCore(Boolean) Inherited from Animatable
GetAnimationBaseValue(DependencyProperty) Inherited from Animatable
HasAnimatedProperties Inherited from Animatable
ShouldSerializeStoredWeakReference(DependencyObject) Inherited from Animatable
Opacity Inherited from Brush
OpacityProperty Inherited from Brush
RelativeTransform Inherited from Brush
RelativeTransformProperty Inherited from Brush
IFormattable.ToString(String, IFormatProvider) Inherited from Brush
ToString() Inherited from Brush
ToString(IFormatProvider) Inherited from Brush
Transform Inherited from Brush
TransformProperty Inherited from Brush
ColorInterpolationMode Inherited from GradientBrush
ColorInterpolationModeProperty Inherited from GradientBrush
GradientStops Inherited from GradientBrush
GradientStopsProperty Inherited from GradientBrush
MappingMode Inherited from GradientBrush
MappingModeProperty Inherited from GradientBrush
SpreadMethod Inherited from GradientBrush
SpreadMethodProperty Inherited from GradientBrush
CheckAccess() Inherited from DispatcherObject
Dispatcher Inherited from DispatcherObject
VerifyAccess() Inherited from DispatcherObject

Applies to

See Also