# Getting Started with WPF RadSvgImage

This tutorial will walk you through the creation of a sample application that contains a `RadSvgImage` control.

## Adding Telerik Assemblies Using NuGet

To use `RadSvgImage` when working with NuGet packages, install the `Telerik.Windows.Controls.for.Wpf.Xaml` package. The [package name may vary](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/nuget/available-packages) slightly based on the Telerik dlls set - [Xaml or NoXaml](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/xaml-vs-noxaml)

Read more about NuGet installation in the [Installing UI for WPF from NuGet Package](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/nuget/nuget-installation) article.

> tip With the 2025 Q1 release, the Telerik UI for WPF has a new licensing mechanism. You can learn more about it [here](https://www.telerik.com/products/wpf/documentation/installation/licensing/installing-license-key).

## Adding Assembly References Manually

If you are not using NuGet packages, you can add a reference to the following assemblies:

* **Telerik.Licensing.Runtime**
* **Telerik.Windows.Controls**

## Defining the RadSvgImage as a Stand-Alone Component

You can add `RadSvgImage` manually in XAML as demonstrated in the following example:

**Adding RadSvgImage in XAML**

```XAML
<telerik:RadSvgImage x:Name="svgImage"/>
```

## Displaying an SVG image

To display an SVG image in the `RadSvgImage` control, you can set the `UriSource` property.

**Displaying an SVG image using the UriSource property**

```XAML
<telerik:RadSvgImage UriSource="MySVGImage.svg"
                 Width="128"
                 Height="128"/>
```

> caption RadSvgImage with an SVG image

![WPF RadSvgImage with an SVG image](https://www.telerik.com/products/wpf/documentation/assets/f17e0891170d10aa30275ba154887d85/radsvgimage-getting-started-0.png)

> important Тhe `RadSVGImage` control does not have a specified size by default. When placed in a panel that measures it with `double.PositiveInfinity`, for example, in a `StackPanel`, it will need to have a set size in order to display the SVG image.

## Defining the RadSvgImage as a Markup Extension

The `RadSvgImage` control provides the ability to use it as a markup extension, instead of defining it as a stand-alone component.

**RadSvgImage as a markup extension**

```XAML
<Image Source="{telerik:RadSvgImageSource Source='MySVGImage.svg'}"
   Width="128"
   Height="128"/>
```

> caption RadSvgImage as a markup extension

![WPF RadSvgImage as a markup extension](https://www.telerik.com/products/wpf/documentation/assets/f17e0891170d10aa30275ba154887d85/radsvgimage-getting-started-0.png)

## Displaying an Xml-Based String

The `RadSvgImage` control provides the `XmlSource` property that allows you to set an xml-based string and display it.

**Setting the XmlSource property**

```C#
this.svgImage.XmlSource = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n<svg height=\"100\" width=\"100\">\r\n  <circle cx=\"50\" cy=\"50\" r=\"40\" stroke=\"black\" stroke-width=\"3\" fill=\"red\" />\r\n</svg>";
```

```VB.NET
Me.svgImage.XmlSource = "<?xml version=""1.0"" encoding=""UTF-8"" standalone=""no""?>" & vbCrLf & "<svg height=""100"" width=""100"">" & vbCrLf & "  <circle cx=""50"" cy=""50"" r=""40"" stroke=""black"" stroke-width=""3"" fill=""red"" />" & vbCrLf & "</svg>"
```

> caption RadSvgImage displaying an xml-based string

![WPF RadSvgImage displaying an xml-based string](https://www.telerik.com/products/wpf/documentation/assets/fd0c75cb49d4796985b4b2cb8a4f7f22/radsvgimage-getting-started-1.png)

## Overriding Color

The `RadSVGImage` component allows you to replace the fill color of the geometry that displays the SVG image. To do so, set the `OverrideColor` property.

**Setting the OverrideColor property**

```XAML
<telerik:RadSvgImage UriSource="MySVGImage.svg"
                 OverrideColor="Red"
                 Width="128"
                 Height="128"/>
```

> caption RadSvgImage with set OverrideColor

![WPF RadSvgImage with set OverrideColor](https://www.telerik.com/products/wpf/documentation/assets/b37e24a030b599b2508b2801b4f504f2/radsvgimage-getting-started-2.png)

## Not Supported SVG File Format Properties

The `RadSvgImage` control does not support the following SVG file format properties:

* \<audio/>
* \<mask/>
* \<mpath/>
* \<canvas/>
* \<video/>

## Telerik UI for WPF Learning Resources

* [Telerik UI for WPF SvgImage Component](https://www.telerik.com/products/wpf/svgimage.aspx)
* [Getting Started with Telerik UI for WPF Components](https://www.telerik.com/products/wpf/documentation/getting-started/first-steps-nuget)
* [Telerik UI for WPF Installation](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/installation-guide)
* [Telerik UI for WPF and WinForms Integration](https://www.telerik.com/products/wpf/documentation/common-information/winforms-integration/overview)
* [Telerik UI for WPF Visual Studio Templates](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/visual-studio-templates)
* [Setting a Theme with Telerik UI for WPF](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/styling-apperance-setting-a-theme-overview)
* [Telerik UI for WPF Virtual Classroom (Training Courses for Registered Users)](https://learn.telerik.com/learn/course/external/view/elearning/16/telerik-ui-for-wpf)
* [Telerik UI for WPF License Agreement](https://www.telerik.com/purchase/license-agreement/wpf-dlw-s)

## See Also

* [Animations](https://www.telerik.com/products/wpf/documentation/controls/radsvgimage/animations)
* [Clipping](https://www.telerik.com/products/wpf/documentation/controls/radsvgimage/clipping)
* [Paint Servers](https://www.telerik.com/products/wpf/documentation/controls/radsvgimage/paint-servers)
