Back to Devexpress

SvgImageSourceExtension Class

wpf-devexpress-dot-xpf-dot-core-3afe4977.md

latest3.8 KB
Original Source

SvgImageSourceExtension Class

Allows you to use SVG images as ImageSource values.

Namespace : DevExpress.Xpf.Core

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public class SvgImageSourceExtension :
    BaseSvgImageSourceExtension
vb
Public Class SvgImageSourceExtension
    Inherits BaseSvgImageSourceExtension

Remarks

The code sample below shows how to use the SvgImageSourceExtension to specify an SVG image.

xaml
<Image Source="{dx:SvgImageSource Uri=Images/Notebook.svg}"/>

Refer to the SVG Images topic for more information.

The following code snippets (auto-collected from DevExpress Examples) contain references to the SvgImageSourceExtension class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-svgimagesource-extension-specify-vector-image-as-glyph/CS/DXSample/MainWindow.xaml#L17

xml
<dxb:BarButtonItem Content="Notebook"
           Glyph="{dx:SvgImageSource Uri=Images/Notebook.svg}"
           BarItemDisplayMode="ContentAndGlyph"

reporting-wpf-report-designer-customize-ribbon-toolbar/CS/MainWindow.xaml#L21

xml
<dxb:InsertAction.Element>
    <dxb:BarButtonItem LargeGlyph="{dx:SvgImageSource Uri='/CustomizeReportDesignerToolbar;component/Images/Close.svg'}"
                       Content="Close Document" ItemClick="CloseDocumentButton_ItemClick"/>

reporting-wpf-customize-property-grid-in-the-report-designer/CS/App.xaml#L8

xml
<Application.Resources>
    <dx:SvgImageSource x:Key="{dxrudt:PropertyGridCategoryIconThemeKey 'My tab'}"
                        Uri="Images/MyTab.svg" />

wpf-svg-images-use-palettes-to-replace-image-colors/CS/SVGPalettes/MainWindow.xaml#L25

xml
<Grid>
    <Image Source="{dx:SvgImageSource Uri=Images/logo.svg}" Width="164"
           dx:SvgImageHelper.State="{Binding Path=(dx:ThemeManager.TreeWalker).ThemeName, RelativeSource={RelativeSource Self}}">

Inheritance

Object MarkupExtension BaseSvgImageSourceExtension SvgImageSourceExtension

See Also

SvgImageSourceExtension Members

DevExpress.Xpf.Core Namespace