Click or drag to resize
AB4D logo

ReaderSvg Properties

The ReaderSvg type exposes the following members.

Properties
  NameDescription
Public propertyAddHiddenElements
Gets or sets a Boolean that specifies if hidden elements are read. Default value is true.
Public propertyCode exampleAddNewCanvasForTransformations
If true (default = false) transformations on elements are not set on the element itself but are set to a new canvas and the element is added as its parent. This property is added for backward compatibility with versions 2.3 and older.
Public propertyAutoSize
When AutoSize is false the size of read svg objects is determined by the width and height defined in the svg header. For example when svg header define the size as Letter, than the read svg objects will retain the position within the letter area. When AutoSize is set to true (by default), the size defined in svg header is ignored. Instead the size of the actual svg content is calculated so that the read objects do not have any empty area around them. The calculated or read size of svg elements can be read from SvgBounds property.
Public propertyBitmapImages
Gets list of all bitmap images that are defined in svg file and cannot be converted to vector elements.
Public propertyConvertTransformationsToMatrixTransform
Gets or sets a Boolean that specifies if all transformations are converted to MatrixTransform. Default values is false that preserves the type of transformation defined in svg file.
Public propertyDescription
Description defined in svg file
Public propertyFlattenHierarchies
Gets or sets a Boolean that specifies if all child groups (Canvases or DrawingGroup) are removed and all elements are placed under the root group. The group transformations are added to child objects so that the rendered drawing looks the same. The exception to the removed groups are the groups that define clipping.
Public propertyHasCustomProperties
Gets a Boolean that specifies if the read svg files has some custom properties defined.
Public propertyHeight
Gets or sets the Height of the returned Viewbox element
Public propertyHeightInUnits
Gets a string that represents height of svg element in specified units (for example "2cm" or "2in"). If the read sgv element does not specify units, than this value is null.
Public propertyInnerCanvas
Gets the inner canvas without the Viewbox control. See also SvgBounds.
Public propertyInnerHeight Obsolete.
Gets Height of all read svg elements
Public propertyInnerWidth Obsolete.
Gets the Width of all read svg elements
Public propertyStatic memberCode exampleInstance
Gets static instance of Ab2d.ReaderSvg so you do not need to create your own instance of it.
Public propertyIsCorrectingNamesForWpf
Gets or sets a Boolean that specifies if the names are corrected so that they can be used in XAML. The following rule is applied in this case: name must start with a letter or underscore and can contain only letters, digits, or underscores. If true, then invalid characters are replaced with underscore. If false, then the NamedObjects dictionary contains unchanged names, but the GetXaml method still corrects the names. Default value is true (for backwards compatibility).
Public propertyLastReadImage
Gets the lastly read svg as WPF's Image element (used when ReadGeometry is used, when using Read method see LastReadViewbox)
Public propertyLastReadViewbox
Gets the lastly read svg as WPF's Viewbox element (used when Read is used, when using ReadGeometry method see LastReadImage)
Public propertyStatic memberLicenseInfo
License information
Public propertyMakeNamesUnique
Gets or sets a Boolean that specifies if ReaderSvg adds index text to the names of objects that were already used to make them unique. For example if svg object has a name "SvgObject" and if the second svg object has the same name, the second svg object will be named "SvgObject2". Default value is true.
Public propertyNamedObjects
Dictionary with elements ids as keys and its appropriate objects as values Ids (keys) can be defined in a drawing application
Public propertyNamedObjectsSource
Gets or sets one of the ReaderSvgNamedObjectsSourceType as the source to get the object's name. Default value is NamedObjectsSourceType.Auto.
Public propertyOptimizeObjectGroups
Gets or sets a Boolean that specifies if groups (Canvas or DrawingGroup) are optimized in such a way that they groups that contain only one other group (Canvas or DrawingGroup) are removed. Default value is false which preserves the groups as they are defined in the original svg file.
Public propertyOptimizeStyleProcessing
Gets or sets a Boolean that specifies if ReaderSvg is using an optimized style processing that improves speed of reading svg file (default value is true).
Public propertyOverrideMiterLimit
Gets or sets a value that is used instead of the miter limit specified in the svg file. If value is 0, than the miter limit from svg file is used. Default value is 0.
Public propertyReadForeignObjects
Gets or sets a boolean that specifies if foreignObject elements in svg files are read (currently only Visio metafiles are supported). Default value is true.
Public propertyReadPathAsPathGeometry
If false (default) the path is read as StreamGeometry (better performance). If true the path is read as PathGeometry (worse performance but path can be modified).
Public propertySetNameProperty
Gets or sets a Boolean that determines if the object's Name property is set to the name defined in svg file (default value is true).
Public propertySetSvgNameToParentTransformCanvas
Gets or sets a boolean that specifies if object name is set to the Canvas that is created to contain object's transformation when the object also defines the Canvas.Left and Canvas.Top properties. Default value is false.
Public propertyShowDemoTextInEvaluation Obsolete.
ShowDemoTextInEvaluation is not used any more.
Public propertySvgBounds
Gets the bounds of the svg elements. Note: Usually svg elements does not start at (0,0) but are places in a virtual letter. To work only with svg elements so they can be sized according to the host element (for example StackPanel, Page, etc.) two Canvases and a Viewbox is used. But with SvgBounds property it is possible to get the original bounds of the svg elements. If AutoSize is set to false, the SvgBounds are get from the root svg element. Also this property makes InnerWeight and InnerHeight obsolete.
Public propertySvgCreator
Gets an application that was used to create this svg file.
Public propertySwitchElementProcessingType
Specifies which children of the svg switch element will be imported and shown. Default value is ShowFirstCollapseOthers (imports all switch children but shows only the first one; others are Collapsed).
Public propertyTitle
Title defined in svg file
Public propertyTransformCanvasNameFormatString
Gets or sets a string that specifies how the Transform Canvas that is created to contain object's transformation is named. Default value is "{0}_transform".
Public propertyTransformShapes
Gets or sets a Boolean that specifies if all shape objects (Rectangles, Ellipses, Path, Polygons, etc.) that have simple transformation (only translate or scale) or canvas position are transformed with changing their data with the specified transformation. This can remove RenderTransform, Canvas.Left and Canvas.Top from most of the shapes (exception are shapes that render transform).
Public propertyUseOldSizeMeasurement
If true than size measurement from ReaderSvg v1.2 is used - if your application depends on previous sizes of read elements than use this property. Note: Size measurement is used so svg elements can be used inside other controls - so its size is adjusted regarding to the desired size - set with Width and Height properties or by the parent element. This property will exit only in ReaderSvg v1.3
Public propertyUseOnlyInstalledFontFamilies
When UseOnlyInstalledFontFamilies is false (by default), then FontFamily is created also with font names that are not installed on the system (this preserves the original font family name when exported to XAML). When UseOnlyInstalledFontFamilies is true and font family name in svg file is not installed on the system, then Arial font family is used.
Public propertyUseSimpleText
If true text is always rendered as TextBlock - also if text is using custom strokes and fill patters. If false than in case of custom strokes and fill patterns text is converted into Path elements and the appropriate effects are applied to it. Default value is false;
Public propertyWidth
Gets or sets the Width of the returned Viewbox element
Public propertyWidthInUnits
Gets a string that represents width of svg element in specified units (for example "2cm" or "2in"). If the read sgv element does not specify units, than this value is null.
Top
See Also