Adding new Rad Buttons with image in code

2 posts, 1 answers
  1. Anne Lyon
    Anne Lyon avatar
    90 posts
    Member since:
    Jan 2010

    Posted 21 Jun 2010 Link to this post


    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?
  2. Answer
    Miro Miroslavov
    Miro Miroslavov avatar
    588 posts

    Posted 22 Jun 2010 Link to this post

    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
Back to Top