Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DrawingContext.DrawVideo Method (MediaPlayer, Rect, AnimationClock)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

Namespace:   System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)

public abstract void DrawVideo(
	MediaPlayer player,
	Rect rectangle,
	AnimationClock rectangleAnimations
)

Parameters

player
Type: System.Windows.Media.MediaPlayer

The media to draw.

rectangle
Type: System.Windows.Rect

The area in which to draw the media.

rectangleAnimations
Type: System.Windows.Media.Animation.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.

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.

MediaPermission

to display media that you have WebPermission or FileIOPermission access for. Associated enumeration: MediaPermissionImage.SiteOfOriginImage.

MediaPermission

to display media that you do not have WebPermission or FileIOPermission access for. Associated enumeration: MediaPermissionImage.SafeImage.

.NET Framework
Available since 3.0
Return to top
Show:
© 2018 Microsoft