Szerkesztés

Megosztás a következőn keresztül:


DrawingContext.DrawRoundedRectangle Method

Definition

Draws a rounded rectangle.

Overloads

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)

Draws a rounded rectangle with the specified Brush and Pen.

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
Public MustOverride Sub DrawRoundedRectangle (brush As Brush, pen As Pen, rectangle As Rect, rectangleAnimations As AnimationClock, radiusX As Double, radiusXAnimations As AnimationClock, radiusY As Double, radiusYAnimations As AnimationClock)

Parameters

brush
Brush

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

pen
Pen

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

rectangle
Rect

The rectangle to draw.

rectangleAnimations
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

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

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

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

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.

Applies to

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
Public MustOverride Sub DrawRoundedRectangle (brush As Brush, pen As Pen, rectangle As Rect, radiusX As Double, radiusY As Double)

Parameters

brush
Brush

The brush used to fill the rectangle.

pen
Pen

The pen used to stroke the rectangle.

rectangle
Rect

The rectangle to draw.

radiusX
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

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