All docs
V21.2
21.2
21.1
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

SvgImageBox.ExportSvgImage(String, SvgImageBoxOptionsExport) Method

Saves the current image to the specified file in SVG format.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.Utils.v21.2.dll

Declaration

public void ExportSvgImage(
    string path,
    SvgImageBoxOptionsExport exportOptions = null
)

Parameters

Name Type Description
path String

The path to the file to which the image is exported.

Optional Parameters

Name Type Default Description
exportOptions SvgImageBoxOptionsExport

null

An optional object that contains export options.

Remarks

The ExportSvgImage method does not save the items’ tags (SvgImageItem.Tag) to the output.

To save item apperance settings (SvgImageBox.ItemAppearance and SvgImageItem.Appearance), use the StoreAppearance property. This property is a combination of bit flags that specify whether to save the appearance settings applied to items in the normal, selected, hovered, and disabled states.

The ExportSvgImage method called without the optional exportOptions parameter takes into account the control’s SvgImageBox.OptionsExport.StoreAppearance setting.

svgImageBox1.OptionsExport.StoreAppearance = DevExpress.XtraEditors.AppearanceTypes.All;
svgImageBox1.ExportSvgImage("svgimagebox.svg");

You can also set the StoreAppearance setting using the ExportSvgImage method’s exportOptions parameter. In this case, the method ignores the control’s SvgImageBox.OptionsExport.StoreAppearance property.

SvgImageBoxOptionsExport expOptions = new SvgImageBoxOptionsExport();
expOptions.StoreAppearance = AppearanceTypes.Normal | AppearanceTypes.Disabled;
svgImageBox1.ExportSvgImage("svgimagebox.svg", expOptions);
See Also