編輯

共用方式為


DrawingContext.DrawLine Method

Definition

Draws a line with the specified Pen.

Overloads

DrawLine(Pen, Point, Point)

Draws a line between the specified points using the specified Pen.

DrawLine(Pen, Point, AnimationClock, Point, AnimationClock)

Draws a line between the specified points using the specified Pen and applies the specified animation clocks.

DrawLine(Pen, Point, Point)

Draws a line between the specified points using the specified Pen.

public:
 abstract void DrawLine(System::Windows::Media::Pen ^ pen, System::Windows::Point point0, System::Windows::Point point1);
public abstract void DrawLine (System.Windows.Media.Pen pen, System.Windows.Point point0, System.Windows.Point point1);
abstract member DrawLine : System.Windows.Media.Pen * System.Windows.Point * System.Windows.Point -> unit
Public MustOverride Sub DrawLine (pen As Pen, point0 As Point, point1 As Point)

Parameters

pen
Pen

The pen with which to stroke the line.

point0
Point

The start point of the line.

point1
Point

The end point of the line.

Applies to

DrawLine(Pen, Point, AnimationClock, Point, AnimationClock)

Draws a line between the specified points using the specified Pen and applies the specified animation clocks.

public:
 abstract void DrawLine(System::Windows::Media::Pen ^ pen, System::Windows::Point point0, System::Windows::Media::Animation::AnimationClock ^ point0Animations, System::Windows::Point point1, System::Windows::Media::Animation::AnimationClock ^ point1Animations);
public abstract void DrawLine (System.Windows.Media.Pen pen, System.Windows.Point point0, System.Windows.Media.Animation.AnimationClock point0Animations, System.Windows.Point point1, System.Windows.Media.Animation.AnimationClock point1Animations);
abstract member DrawLine : System.Windows.Media.Pen * System.Windows.Point * System.Windows.Media.Animation.AnimationClock * System.Windows.Point * System.Windows.Media.Animation.AnimationClock -> unit
Public MustOverride Sub DrawLine (pen As Pen, point0 As Point, point0Animations As AnimationClock, point1 As Point, point1Animations As AnimationClock)

Parameters

pen
Pen

The pen to stroke the line.

point0
Point

The start point of the line.

point0Animations
AnimationClock

The clock with which to animate the start point of the line, or null for no animation. This clock must be created from an AnimationTimeline that can animate Point objects.

point1
Point

The end point of the line.

point1Animations
AnimationClock

The clock with which to animate the end point of the line, or null for no animation. This clock must be created from an AnimationTimeline that can animate Point objects.

Applies to