Click or drag to resize

ExtensionsAsBitmapImage Method

Draws the visuals of a FrameworkElement to a BitmapImage

Namespace:  Cauldron.XAML
Assembly:  Cauldron.Win32.WPF (in Cauldron.Win32.WPF.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static Task<BitmapImage> AsBitmapImage(
	this FrameworkElement element
)

Parameters

element
Type: System.WindowsFrameworkElement
The FrameworkElement whose visuals are drawn to an image

Return Value

Type: TaskBitmapImage
An image representation of the FrameworkElement

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type FrameworkElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also