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

Size of application button image?

3 Answers 191 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
Iron
Iron
David asked on 15 Oct 2013, 07:14 PM
when i updated recently from the 2012 Q3 release to the 2013 Q2 release, i notice the following difference in appearance of the application button.  we set ApplicationButtonImageSource to a png in our project.  the image still shows up fine, but the clipping is different.  previously, the height of the application button + tab portion was high enough to fit the tabs and cropped the image in the application button.  now, the image expands the height of that portion of the ribbonview to fully fit the image.

for instance, say we have a 100x100 image, and the tabs need to be 50 pixels high to accommodate the text.  previously, the application-button-plus-tabs area would be 50 pixels high and the 25th through 75th rows of the image were displayed (so, cropped, not scaled, and centered on the image).  now, it is 100 pixels high and the image is fully visible..

how can i restore the previous behavior, please?

images of new and old behavior attached.

thanks!

-david

3 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 16 Oct 2013, 03:50 PM
Hello David,

This is a intended change that allows the RadRibbonApplicationButton and RadRibbonTabs to be resized accordingly their highest content. 

If you want you application to behave like before the upgrade you may place the image as a Window's resource, set its Height to a value you want and to set this image as a StaticResource to the RadRibbonView's ApplicationButtonContent property. Please take a look at the attached project.

Please excuse us for the caused inconvenience.

Regards,
Stefan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
David
Top achievements
Rank 1
Iron
Iron
answered on 17 Oct 2013, 03:06 PM
thanks!  that will work for the time being.

would there be any way that we can have the the application button size to whatever height the tabs need without explicitly sizing the image?  for instance, the suggested method will couple the height of an image explicitly to the text height -- if we change the font size on the tabs, for instance, we'd also need to edit the image.  possibly something using a style?  or a property on one of the ribbon parts?
0
Stefan
Telerik team
answered on 22 Oct 2013, 08:48 AM
Hello David,

One possible way to achieve the described behavior is to bind the Image's height to the height of any RadRibbonTab. So when you set those tab a value for its Height property or change it the image in the ApplicationButton will change its height accordingly.

On the other hand if you want to change the font size of the RadRibbonTabs there is no problem to do it when the Height of the image is set.

I attached the updated solution where you can find my implementation of the both approaches. Also please have in mind that the height of the ApplicationButton can't be less than 24.
 
Regards,
Stefan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
RibbonView and RibbonWindow
Asked by
David
Top achievements
Rank 1
Iron
Iron
Answers by
Stefan
Telerik team
David
Top achievements
Rank 1
Iron
Iron
Share this question
or