Is it possible to set picture (bitmap icon) to surface of telerik:RadButton or telerik:RadRadioButton ?

5 posts, 1 answers
  1. Eugene
    Eugene avatar
    83 posts
    Member since:
    Jan 2016

    Posted 27 Mar Link to this post

    Hi! Is it possible to set picture (bitmap icon) to surface of RadButton or to surface of RadRadioButton so that this picture would occupy the entire surface of RadButton or RadRadioButton? And what format (GIF, JPJ, PNG, e.t.c) must have bitmap icon for its placing on RadButton' surface or RadRadioButton' surface?
  2. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 28 Mar Link to this post

    Hello Eugene,

    You can use a native Image element to display the picture and place it inside the Content of the button. Here is an example:
    <telerik:RadButton>
        <telerik:RadButton.Content>
            <Image Source="myimage.png" Stretch="Fill" />
        </telerik:RadButton.Content>
    </telerik:RadButton>
    Or you can set the picture as a Background of the button using an ImageBrush.
    <telerik:RadButton Content="Button">
        <telerik:RadButton.Background>
            <ImageBrush ImageSource="myimage.png"/>
        </telerik:RadButton.Background>
    </telerik:RadButton>

    I hope this helps.

    Regards,
    Martin
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Eugene
    Eugene avatar
    83 posts
    Member since:
    Jan 2016

    Posted 28 Mar in reply to Martin Link to this post

    OK, Martin. Thank you. But what about RadRadioButton? Can bitmap icon be placed on surface of RadRadioButton? I'll be be obliged to you for your answer very.
  5. Answer
    Martin
    Admin
    Martin avatar
    1101 posts

    Posted 28 Mar Link to this post

    Hi Eugene,

    The same applies also for RadRadioButton. You can  use Image or ImageBrush to display the picture.

    Regards,
    Martin
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  6. Eugene
    Eugene avatar
    83 posts
    Member since:
    Jan 2016

    Posted 29 Mar in reply to Martin Link to this post

    Thank you very much, Martin. Your help supports me greatly.
Back to Top
UI for WPF is Visual Studio 2017 Ready