WmfViewbox Class |
Namespace: Ab2d.Controls
public class WmfViewbox : Viewbox, IUriContext, ISupportInitialize
The WmfViewbox type exposes the following members.
Name | Description | |
---|---|---|
WmfViewbox |
Constructor
|
Name | Description | |
---|---|---|
InnerReaderWmf |
Gets the ReaderWmf that was used to read the metafile file.
| |
Source |
Source
|
Name | Description | |
---|---|---|
MetafileLoaded |
Occurs when the reading of metafile is completed.
| |
MetafileLoading |
Occurs before the reading of metafile is started.
|
Name | Description | |
---|---|---|
SourceProperty |
SourceProperty
|
The difference between WmfDrawing and WmfViewbox is that WmfViewbox gets objects as Shapes Shapes (Canvas, Path, Polyline, etc) and WmfDrawing produces Drawings (DrawingGeometry, StreamGeometry, etc). Drawings have better performance and lower memory consumption, but Shapes support more funtionality - layout, focus, mouse events, etc.
WmfViewbox can be used in xaml. If you would like to read metafile in code and need some more advanced features and options please use ReaderWmf
<Window x:Class="Ab2d.ReaderWmfSample" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ab2d="clr-namespace:Ab2d.Controls;assembly=Ab2d.ReaderWmf" Title="Window1" Height="500" Width="500"/> <Grid> <ab2d:WmfViewbox Name="myWmfViewbox" Source="myMetafile.wmf" Stretch="Uniform"/> </Grid> </Window>