Table of Contents

Class SvgControl

Namespace
SharpVectors.Converters
Assembly
SharpVectors.Converters.Wpf.dll
public class SvgControl : Control, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IUriContext
Inheritance
SvgControl
Implements
Inherited Members

Constructors

SvgControl()

Fields

MessageBackgroundProperty

The DependencyProperty for the MessageBackground property.

Flags: Can be used in style rules

Default Value: PapayaWhip

MessageFillBrushProperty

The DependencyProperty for the MessageFillBrush property.

Flags: Can be used in style rules

Default Value: Gold

MessageFontFamilyProperty

The DependencyProperty for the MessageFontFamily property.

Flags: Can be used in style rules

Default Value: System Dialog Font

MessageFontSizeProperty

The DependencyProperty for the MessageFontSize property.

Flags: Can be used in style rules

Default Value: 48 pixels

MessageOpacityProperty

The DependencyProperty for the MessageOpacity property.

Flags: Can be used in style rules

Default Value: 1 (full opacity)

MessageStrokeBrushProperty

The DependencyProperty for the MessageStrokeBrush property.

Flags: Can be used in style rules

Default Value: Maroon

MessageTextProperty

The DependencyProperty for the MessageText property.

Flags: Can be used in style rules

Default Value: "Loading..."

SizeModeProperty
SourceProperty

Identifies the Source dependency property.

StreamSourceProperty

Identifies the StreamSource dependency property.

Properties

AutoSize

Gets or sets a value indicating whether to automatically resize this Canvas based on the size of the loaded drawing.

BaseUri

Gets or sets the base URI of the current application context.

CultureInfo

Gets or sets the main culture information used for rendering texts.

Drawings

Gets the drawing from the SVG file conversion.

EnsureViewboxPosition

Gets or sets a value to indicate applying a translate transform to the viewbox to ensure it is visible when rendered.

EnsureViewboxSize

Gets or sets a value to indicate preserving the original viewbox size when saving images.

IgnoreRootViewbox

Gets or sets a value to indicate turning off viewbox at the root of the drawing.

IncludeRuntime

Gets or sets a value indicating whether the SharpVectors.Runtime.dll classes are used in the generated output.

MessageBackground

Gets or sets a brush that describes the background of a message text.

MessageFillBrush

Gets or sets the brush with which to fill the message text. This is optional, and can be null. If the brush is null, no fill is drawn.

MessageFontFamily

Gets or sets the font family of the desired font for the message text.

MessageFontSize

Gets or sets the size of the desired font for the message text.

MessageOpacity

Gets or sets the opacity factor applied to the entire message text when it is rendered in the user interface (UI).

MessageStrokeBrush

Gets or sets the brush of the Pen with which to stroke the message text. This is optional, and can be null. If the brush is null, no stroke is drawn.

MessageText

Gets or sets the content of the message.

OptimizePath

Gets or sets a value indicating whether the path geometry is optimized using the StreamGeometry.

RenderedDrawing
SizeMode
Source

Gets or sets the path to the SVG file to load into this Canvas.

StreamSource

Gets or sets the Stream to the SVG source to load into this Canvas.

TextAsGeometry

Gets or sets a value indicating whether the texts are rendered as path geometry.

Methods

ArrangeOverride(Size)

Called to arrange and size the content of a Control object.

CreateDrawing()

Performs the conversion of a valid SVG source to the DrawingGroup.

CreateDrawing(Stream, WpfDrawingSettings)

Performs the conversion of a valid SVG source stream to the DrawingGroup.

CreateDrawing(Uri, WpfDrawingSettings)

Performs the conversion of a valid SVG source file to the DrawingGroup.

GetDrawingSettings()
Load(Stream, bool, bool)

This sets the source SVG for a SvgControl by accessing a stream and optionally processing the result asynchronously.

Load(Uri, bool)

This sets the source SVG for a SvgControl by using the supplied Uniform Resource Identifier (URI) and optionally processing the result asynchronously.

LoadAsync(Stream, bool)

This sets the source SVG for a SvgControl by accessing a stream and processing the result asynchronously.

LoadAsync(Uri)

This sets the source SVG for a SvgControl by using the supplied Uniform Resource Identifier (URI) and processing the result asynchronously.

MeasureOverride(Size)

Called to remeasure a control.

OnAutoSizeChanged()

This handles changes in the automatic resizing property of this control.

OnInitialized(EventArgs)

Raises the Initialized event. This method is invoked whenever IsInitialized is set to true.

OnRender(DrawingContext)

When overridden in a derived class, participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing.

OnRenderSizeChanged(SizeChangedInfo)

Raises the SizeChanged event, using the specified information as part of the eventual event data.

OnSettingsChanged()

This handles changes in the rendering settings of this control.

RenderDiagrams(DrawingGroup)
Unload(bool, string)

This clears the SvgControl of any drawn diagram and optionally displays a message.