This is a migrated thread and some comments may be shown as answers.

Control adding badge

3 Answers 184 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jacob
Top achievements
Rank 1
Jacob asked on 16 Jun 2020, 03:19 PM

Hello,

I currently new  with the WPF and the  telerik technologies and i was wondering if the Telerik has any badge controls (see the attach file for exemple).

if yes, is it possible to add a image on the side in which the format in a SVG.

 

Thanks

 

3 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 19 Jun 2020, 08:03 AM

Hello Jacob,

Can you tell me a bit more about this badge control? Do you have any specification what it should do? Can you click it? Is there any special positioning behavior that should support? Any additional description about the control will be useful.

This seems like a simple Border element with an Image and TextBlock inside. If there isn't anything else that is specific for the badge, you can use this approach. For example:

<Border CornerRadius="5">
	<StackPanel Orientation="Horizontal">
		<Image Source="myImage.png" />
		<TextBlock Text="main" />
	</StackPanel>
</Border>

About the SVG part, in general the WPF framework doesn't support SVG rendering, so you cannot show one in the UI. However, since the WPF uses its own vector-based rendering engine, you can use it to show any shape or geometry. For example, you can read the SVG xml and parse it to WPF geometry objects which can be shown in a Path control. We do not have an example showing how to do this, but there is a feature request to introduce such API out of the box with the Telerik UI for WPF suite.

Regards,
Martin Ivanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Jacob
Top achievements
Rank 1
answered on 19 Jun 2020, 06:48 PM

Hi Martin,

No their is any special mechanism (ex: clickagle), it's juste a simple badge that will be place on the top left of image for  mentionning the main/default image

0
Martin Ivanov
Telerik team
answered on 24 Jun 2020, 10:56 AM

Hello Jacob,

In this case, the most convenient approach that I can think of is the one from my last reply - with the Border and the Image, and TextBlock control. 

Regards,
Martin Ivanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
General Discussions
Asked by
Jacob
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Jacob
Top achievements
Rank 1
Share this question
or