Rediger

Del via


DrawingContext.DrawVideo Method

Definition

Draw a video into the specified region.

Overloads

DrawVideo(MediaPlayer, Rect)

Draws a video into the specified region.

DrawVideo(MediaPlayer, Rect, AnimationClock)

Draws a video into the specified region and applies the specified animation clock.

DrawVideo(MediaPlayer, Rect)

Draws a video into the specified region.

public:
 abstract void DrawVideo(System::Windows::Media::MediaPlayer ^ player, System::Windows::Rect rectangle);
public abstract void DrawVideo (System.Windows.Media.MediaPlayer player, System.Windows.Rect rectangle);
abstract member DrawVideo : System.Windows.Media.MediaPlayer * System.Windows.Rect -> unit
Public MustOverride Sub DrawVideo (player As MediaPlayer, rectangle As Rect)

Parameters

player
MediaPlayer

The media to draw.

rectangle
Rect

The region in which to draw player.

Remarks

Note that the media will be stretched to fit inside the area defined by the rectangle parameter. If rectangle and media have different aspect ratios, distortion will occur. For more control over how media is used to fill an area, use the DrawRectangle command to draw a rectangle and fill it with a VisualBrush that contains media.

Applies to

DrawVideo(MediaPlayer, Rect, AnimationClock)

Draws a video into the specified region and applies the specified animation clock.

public:
 abstract void DrawVideo(System::Windows::Media::MediaPlayer ^ player, System::Windows::Rect rectangle, System::Windows::Media::Animation::AnimationClock ^ rectangleAnimations);
public abstract void DrawVideo (System.Windows.Media.MediaPlayer player, System.Windows.Rect rectangle, System.Windows.Media.Animation.AnimationClock rectangleAnimations);
abstract member DrawVideo : System.Windows.Media.MediaPlayer * System.Windows.Rect * System.Windows.Media.Animation.AnimationClock -> unit
Public MustOverride Sub DrawVideo (player As MediaPlayer, rectangle As Rect, rectangleAnimations As AnimationClock)

Parameters

player
MediaPlayer

The media to draw.

rectangle
Rect

The area in which to draw the media.

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.

Remarks

Note that the media will be stretched to fit inside the area defined by the rectangle parameter. If rectangle and media have different aspect ratios, distortion will occur. For more control over how media is used to fill an area, use the DrawRectangle command to draw a rectangle and fill it with a VisualBrush that contains media.

Applies to