Completed
Last Updated: 25 Dec 2023 09:04 by ADMIN
Release R3 2023
Martin Ivanov
Created on: 28 Jan 2019 09:39
Category: UI for WPF
Type: Feature Request
25
Add control or an API that allows you to show an SVG file
The new API should allow you get an SVG file and convert it in a WPF-friendly format.

If there is a control, it should also display the SVG contents.
3 comments
ADMIN
Stenly
Posted on: 25 Dec 2023 09:04

Hello Wei Wu,

We have included support for displaying SVG images. This is done via our RadSvgImage control and more information on it can be found at the following link:

WPF SvgImage - Overview - Telerik UI for WPF

The following code snippet shows a sample code using a RadButton and a RadSvgImage:

<telerik:RadButton Content="My Button" 
                   HorizontalAlignment="Center" 
                   VerticalAlignment="Center">
    <telerik:RadButton.ContentTemplate>
        <DataTemplate>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <telerik:RadSvgImage UriSource="MySVGImage.svg"
                                     Width="16"
                                     Height="16"/>
                <TextBlock Text="{Binding}"
                           Grid.Column="1"
                           HorizontalAlignment="Center"
                           VerticalAlignment="Center"/>
            </Grid>
        </DataTemplate>
    </telerik:RadButton.ContentTemplate>
</telerik:RadButton>

The produced result is as follows:

I hope the provided information will be of help to you.

Regards,
Stenly
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

W
Posted on: 23 Dec 2023 04:18
I hope there is a straightforward way to display svg icons for buttons etc.
Mi
Posted on: 05 Nov 2020 22:54
It should be possible to use the SVG content for menus and ribbons also!