Click or drag to resize
ReaderWmfGetGeometryFromClipboard Method
Creates metafile from clipboard (if available) and converts it into Viewbox with elements as Shapes (Path, Ellipse, Polyline, etc.) and TextBlocks (for texts).

Namespace: Ab2d
Assembly: Ab2d.ReaderWmf (in Ab2d.ReaderWmf.dll) Version: 7.1.5512.1040
Syntax
C#
public Image GetGeometryFromClipboard()

Return Value

Type: Image
Viewbox with Shape objects from clipboard or null if metafile is not available.
Remarks

The GetFromClipboard method reads the metafile from clipboard and converts it into Viewbox with elements as Shapes (Path, Ellipse, Polyline, etc.) and TextBlocks (for texts).

Drawing objects do not derive from the FrameworkElement class and provide a lighter-weight implementation for rendering shapes, images, and text. Because of this Drawing objects on one side lack support for Layout System, input, and focus, but on the other side have much better performance and lower memory consumption.

Returned Drawing has much better performance as Shapes that are returned with Read method.

If better layout support, input, focus and other functionality is needed use Read method instead that returns elements as Shapes.

It is also possible to optimize the read Drawing objects with the GeometrySettings objects that is passed to the ReadGeometry method.

It is recommended to call IsClipboardMetafileAvailable method before calling GetFromClipboard to check if metafile is available on the clipboard.

If metafile is not available than GetFromClipboard returns null.

If the clipboard cannot be read the method throws an .

See Also