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

Show image in a RadButton

2 Answers 1115 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Md.Hasanuzzaman
Top achievements
Rank 1
Md.Hasanuzzaman asked on 14 Jun 2011, 06:13 PM
Hy i am can`t show image in a RadButton
Please told me how can i do this

2 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 20 Jun 2011, 08:16 AM
Hello Md,

I attached an example of how you can place a jpg image in the content of the RadButton. Let us know if this helped you or if your scenario is more complex.

Best wishes,
Petar Mladenov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Paul
Top achievements
Rank 2
Iron
Iron
Iron
commented on 09 Dec 2021, 12:06 PM

How do I make the image fill the button, tried  HorizontalContentAlignment="Stretch" and VerticalContentAlignment="Stretch" but there is still a grey border.
0
Petar Mladenov
Telerik team
answered on 09 Dec 2021, 01:26 PM

Hi Paul,

Not sure if you are dealing with the current project here or with another one, but generally you should used Padding="0" to remove a gap between the Button's ContentPresenter and its boundaries. However same images might have transparent parts, or the WPF framework might not fill the Image entirely (pixel perfect) over its bounding control. That is why I suggest you to also try BorderThickness="0" on the button and also SnapToDevicePicels=True.

Regards,
Petar Mladenov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Buttons
Asked by
Md.Hasanuzzaman
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or