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

RadRibbonButton wrong vertical allignment of content

1 Answer 83 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Dario
Top achievements
Rank 2
Dario asked on 25 Mar 2013, 09:51 AM
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:RadRibbonGroup>
    </telerik:RadRibbonTab>
    <telerik:RadRibbonTab Header="Modifica" >
        <telerik:RadRibbonGroup Header="Cliente">
            <telerik:RadRibbonButton Content="Dati" Size="Large" LargeImage="/CRMClient;component/Images/Action/Aggiorna32.png" />
        </telerik:RadRibbonGroup>
    </telerik:RadRibbonTab>
</telerik:RadRibbonView>

1 Answer, 1 is accepted

Sort by
0
Accepted
Kiril Vandov
Telerik team
answered on 27 Mar 2013, 03:13 PM
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.

Tags
RibbonView and RibbonWindow
Asked by
Dario
Top achievements
Rank 2
Answers by
Kiril Vandov
Telerik team
Share this question
or