Click or drag to resize

ExtensionsSaveVisualAsPngAsync Method

Saves the visuals of a FrameworkElement to a png file

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 SaveVisualAsPngAsync(
	this FrameworkElement visual,
	FileInfo file
)

Parameters

visual
Type: System.WindowsFrameworkElement
The FrameworkElementFactory whose visuals are drawn to an image
file
Type: System.IOFileInfo
The file of the png to save to

Return Value

Type: Task

[Missing <returns> documentation for "M:Cauldron.XAML.Extensions.SaveVisualAsPngAsync(System.Windows.FrameworkElement,System.IO.FileInfo)"]

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