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

Adding new Rad Buttons with image in code

1 Answer 89 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Anne Lyon
Top achievements
Rank 1
Anne Lyon asked on 21 Jun 2010, 11:58 AM
Hi,

I need to add buttons to my application dynamically and instead of a caption I would like to display an image on each button. I seem to find how to do this in the XAML for static buttons but how do I do this in the C++ code? I can easily add a button at run-time, but there doesn't seem to be any properties to bind the button to an image?
Thanks!

1 Answer, 1 is accepted

Sort by
0
Accepted
Miro Miroslavov
Telerik team
answered on 22 Jun 2010, 10:58 AM
Hi Anne Lyon,

You should set the RadButton.Content property to instance of type Image (and pass that Image to it's source the actual image you want).
If you need further assistance, please ask us.

Best wishes,
Miro Miroslavov
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
Tags
Buttons
Asked by
Anne Lyon
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
Share this question
or