DrawingContext.DrawImage DrawingContext.DrawImage DrawingContext.DrawImage Method

Definition

Draws an image into the region defined by the specified Rect.

Overloads

DrawImage(ImageSource, Rect) DrawImage(ImageSource, Rect) DrawImage(ImageSource, Rect)

Draws an image into the region defined by the specified Rect.

DrawImage(ImageSource, Rect, AnimationClock) DrawImage(ImageSource, Rect, AnimationClock) DrawImage(ImageSource, Rect, AnimationClock)

Draws an image into the region defined by the specified Rect and applies the specified animation clock.

DrawImage(ImageSource, Rect) DrawImage(ImageSource, Rect) DrawImage(ImageSource, Rect)

Draws an image into the region defined by the specified Rect.

public:
 abstract void DrawImage(System::Windows::Media::ImageSource ^ imageSource, System::Windows::Rect rectangle);
public abstract void DrawImage (System.Windows.Media.ImageSource imageSource, System.Windows.Rect rectangle);
abstract member DrawImage : System.Windows.Media.ImageSource * System.Windows.Rect -> unit

Parameters

imageSource
ImageSource ImageSource ImageSource

The image to draw.

rectangle
Rect Rect Rect

The region in which to draw bitmapSource.

Security

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

DrawImage(ImageSource, Rect, AnimationClock) DrawImage(ImageSource, Rect, AnimationClock) DrawImage(ImageSource, Rect, AnimationClock)

Draws an image into the region defined by the specified Rect and applies the specified animation clock.

public:
 abstract void DrawImage(System::Windows::Media::ImageSource ^ imageSource, System::Windows::Rect rectangle, System::Windows::Media::Animation::AnimationClock ^ rectangleAnimations);
public abstract void DrawImage (System.Windows.Media.ImageSource imageSource, System.Windows.Rect rectangle, System.Windows.Media.Animation.AnimationClock rectangleAnimations);
abstract member DrawImage : System.Windows.Media.ImageSource * System.Windows.Rect * System.Windows.Media.Animation.AnimationClock -> unit

Parameters

imageSource
ImageSource ImageSource ImageSource

The image to draw.

rectangle
Rect Rect Rect

The region in which to draw bitmapSource.

rectangleAnimations
AnimationClock AnimationClock 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.

Security

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

Applies to