RadRibbonButton wrong vertical allignment of content

2 posts, 1 answers
  1. Dario
    Dario avatar
    61 posts
    Member since:
    Apr 2011

    Posted 25 Mar 2013 Link to this post

    Hi to all,
    I have 1 RadRibbonView with 2 RadRibbonTab. First one has 2 RadRibbonButton, second one has 1 RadRibbonButton.
    But I obtain a wrong vertical allignment of RadRibbonButton Text, it's center!!!
    How is it possibile? I haven't particular style on it.

    <telerik:RadRibbonView ApplicationButtonVisibility="Collapsed" TitleBarVisibility="Collapsed">
        <telerik:RadRibbonTab Header="Crea">
            <telerik:RadRibbonGroup Header="Attività">
                <telerik:RadRibbonButton Content="Da Fare" Size="Large" LargeImage="/CRMClient;component/Images/Action/CosaDaFare32.png"/>
                <telerik:RadRibbonButton Content="Esito"  Size="Large" LargeImage="/CRMClient;component/Images/Action/Esito32.png" />
        <telerik:RadRibbonTab Header="Modifica" >
            <telerik:RadRibbonGroup Header="Cliente">
                <telerik:RadRibbonButton Content="Dati" Size="Large" LargeImage="/CRMClient;component/Images/Action/Aggiorna32.png" />

  2. Answer
    Kiril Vandov
    Kiril Vandov avatar
    323 posts

    Posted 27 Mar 2013 Link to this post

    Hello Dario,

    The RadRibbonButtons expose a Text property that is designed to work with the SmallImage/LargeImage properties to control the image and label of the buttons. These properties are also designed to reflect the changes in the button size which can be dynamically changed by the RibbonView resizing logic. For more information about our RibbonButton logic see this article.

    However, we have also left the Content property of the buttons as we wanted to provide a way to set custom content in the buttons. This is why the Content is stretched to fill the available size of the Button and it should be used instead of both the Text and Small/LargeImage properties.

    In your case, I'd recommend taking advantage of the Text property to set the label of the button and not using the Content property at all.

    I hope this information helps.

    Kind regards,
    Kiril Vandov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft R3 2016 release webinar banner
Back to Top