ReaderSvgNamedObjectsSource Property |
Namespace: Ab2d
public ReaderSvgNamedObjectsSourceType NamedObjectsSource { get; set; }
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).