Size of application button image?

4 posts, 1 answers
  1. David
    David avatar
    25 posts
    Member since:
    Jan 2013

    Posted 15 Oct 2013 Link to this post

    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
  2. Answer
    Stefan
    Admin
    Stefan avatar
    89 posts

    Posted 16 Oct 2013 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. David
    David avatar
    25 posts
    Member since:
    Jan 2013

    Posted 17 Oct 2013 Link to this post

    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?
  5. Stefan
    Admin
    Stefan avatar
    89 posts

    Posted 22 Oct 2013 Link to this post

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