DrawingContext.DrawVideo Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기