DrawingContext.DrawRoundedRectangle DrawingContext.DrawRoundedRectangle DrawingContext.DrawRoundedRectangle Method

Definition

Draws a rounded rectangle.

Overloads

DrawRoundedRectangle(Brush, Pen, Rect, AnimationClock, Double, AnimationClock, Double, AnimationClock) DrawRoundedRectangle(Brush, Pen, Rect, AnimationClock, Double, AnimationClock, Double, AnimationClock) DrawRoundedRectangle(Brush, Pen, Rect, AnimationClock, Double, AnimationClock, Double, AnimationClock)

Draws a rounded rectangle with the specified Brush and Pen and applies the specified animation clocks.

DrawRoundedRectangle(Brush, Pen, Rect, Double, Double) DrawRoundedRectangle(Brush, Pen, Rect, Double, Double) DrawRoundedRectangle(Brush, Pen, Rect, Double, Double)

Draws a rounded rectangle with the specified Brush and Pen.

DrawRoundedRectangle(Brush, Pen, Rect, AnimationClock, Double, AnimationClock, Double, AnimationClock) DrawRoundedRectangle(Brush, Pen, Rect, AnimationClock, Double, AnimationClock, Double, AnimationClock) DrawRoundedRectangle(Brush, Pen, Rect, AnimationClock, Double, AnimationClock, Double, AnimationClock)

Draws a rounded rectangle with the specified Brush and Pen and applies the specified animation clocks.

public:
 abstract void DrawRoundedRectangle(System::Windows::Media::Brush ^ brush, System::Windows::Media::Pen ^ pen, System::Windows::Rect rectangle, System::Windows::Media::Animation::AnimationClock ^ rectangleAnimations, double radiusX, System::Windows::Media::Animation::AnimationClock ^ radiusXAnimations, double radiusY, System::Windows::Media::Animation::AnimationClock ^ radiusYAnimations);
public abstract void DrawRoundedRectangle (System.Windows.Media.Brush brush, System.Windows.Media.Pen pen, System.Windows.Rect rectangle, System.Windows.Media.Animation.AnimationClock rectangleAnimations, double radiusX, System.Windows.Media.Animation.AnimationClock radiusXAnimations, double radiusY, System.Windows.Media.Animation.AnimationClock radiusYAnimations);
abstract member DrawRoundedRectangle : System.Windows.Media.Brush * System.Windows.Media.Pen * System.Windows.Rect * System.Windows.Media.Animation.AnimationClock * double * System.Windows.Media.Animation.AnimationClock * double * System.Windows.Media.Animation.AnimationClock -> unit

Parameters

brush
Brush Brush Brush

The brush used to fill the rectangle, or null for no fill.

pen
Pen Pen Pen

The pen used to stroke the rectangle, or null for no stroke.

rectangle
Rect Rect Rect

The rectangle to draw.

rectangleAnimations
AnimationClock AnimationClock AnimationClock

The clock with which to animate the rectangle's size and dimensions, or null for no animation. This clock must be created from an AnimationTimeline that can animate Rect objects.

radiusX
Double Double Double

The radius in the X dimension of the rounded corners. This value will be clamped to the range of 0 to Width/2

radiusXAnimations
AnimationClock AnimationClock AnimationClock

The clock with which to animate the rectangle's radiusX value, or null for no animation. This clock must be created from an AnimationTimeline that can animate Double values.

radiusY
Double Double Double

The radius in the Y dimension of the rounded corners. This value will be clamped to a value between 0 to Height/2.

radiusYAnimations
AnimationClock AnimationClock AnimationClock

The clock with which to animate the rectangle's radiusY value, or null for no animation. This clock must be created from an AnimationTimeline that can animate Double values.

Remarks

The brush and the pen can both be null. If the brush is null, then no fill is performed. If the pen is null, then no stoke is performed. If both the pen and the brush are null, then the drawing is not visible.

DrawRoundedRectangle(Brush, Pen, Rect, Double, Double) DrawRoundedRectangle(Brush, Pen, Rect, Double, Double) DrawRoundedRectangle(Brush, Pen, Rect, Double, Double)

Draws a rounded rectangle with the specified Brush and Pen.

public:
 abstract void DrawRoundedRectangle(System::Windows::Media::Brush ^ brush, System::Windows::Media::Pen ^ pen, System::Windows::Rect rectangle, double radiusX, double radiusY);
public abstract void DrawRoundedRectangle (System.Windows.Media.Brush brush, System.Windows.Media.Pen pen, System.Windows.Rect rectangle, double radiusX, double radiusY);
abstract member DrawRoundedRectangle : System.Windows.Media.Brush * System.Windows.Media.Pen * System.Windows.Rect * double * double -> unit

Parameters

brush
Brush Brush Brush

The brush used to fill the rectangle.

pen
Pen Pen Pen

The pen used to stroke the rectangle.

rectangle
Rect Rect Rect

The rectangle to draw.

radiusX
Double Double Double

The radius in the X dimension of the rounded corners. This value will be clamped to the range of 0 to Width/2.

radiusY
Double Double Double

The radius in the Y dimension of the rounded corners. This value will be clamped to a value between 0 to Height/2.

Remarks

The brush and the pen can both be null. If the brush is null, then no fill is performed. If the pen is null, then no stoke is performed. If both the pen and the brush are null, then the drawing is not visible.

Applies to