Click or drag to resize
AB4D logo

ReaderSvgNamedObjectsSource Property

Gets or sets one of the ReaderSvgNamedObjectsSourceType as the source to get the object's name. Default value is NamedObjectsSourceType.Auto.

Namespace:  Ab2d
Assembly:  Ab2d.ReaderSvg (in Ab2d.ReaderSvg.dll) Version: 7.1.7295.1040
public ReaderSvgNamedObjectsSourceType NamedObjectsSource { get; set; }

Property Value

Type: ReaderSvgNamedObjectsSourceType

The name is used to fill the NamedObjects dictionary or as the Name property in the exported XAML. The names can be get from the id attribute of the svg element or from the title element. Usually names are set from id attribute. But some applications (for example Microsoft Visio) do not allow to change id attribute but instead set the title element.

Setting NamedObjectsSource to Title or TitleIfExist (Id is used if title does not exist) is useful so users can specify the name of the created WPF elements in the application that created the svg file.

By default NamedObjectsSource is set to Auto. This means that ReaderSvg tries to define the source of the name with checking which application created the svg file - for example for files created in Microsoft Visio the TitleIfExist is used internally.

Note that the name must start with a letter or underscore and can contain only letters, digits, or underscores. If this is not the case than the name is corrected by ReaderSvg (underscores are used instead of invalid characters).

See Also