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

RadGalleryItem Images Being Cut Off

1 Answer 77 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Luke Daugherty
Top achievements
Rank 1
Luke Daugherty asked on 18 Nov 2013, 08:25 PM
Hi,

We have a RadRibbonGallery populated with a bunch of RadGalleryItem's. There is no text so the Items are made up of small Image's who's source are 16x16 png files. The ImageHeight and ImageWidth was set to 24 for some padding:

        <telerik:RadRibbonGallery Name="nodeShapeGallery" CompressedThreshold="WhenGroupIsMedium" Icon="/GraphVisualizationModules.Common;component/Resources/Images/32/shapes.png" ItemHeight="24" ItemWidth="24">
            <telerik:RadGalleryItem Image="/Modules.GraphDecorator;component/Resources/Images/rectangleShape.png" Tag="rectangleShape" />
             .
.
.
        </telerik:RadRibbonGallery>

With the latest change all of the Images are being cut off (on all sides). It appears the selection decoration was enlarged for the 2013 Q3 release, thus requiring more space which leaves less room for images of this size. I can increase the ItemWidth and ItemHeight, but that takes a lot more room then previously needed.

Attached is a sample png as well as a screenshot showing the Gallery before (top) and after (bottom) the update to Q3.

Thanks,
Luke Daugherty
Pitney Bowes Software

1 Answer, 1 is accepted

Sort by
0
Kiril Vandov
Telerik team
answered on 19 Nov 2013, 05:22 PM
Hello Luke,

You are correct that the  RadGalleryItems selectionion rectangle is increased and also there is added a default padding. You could override the default behavior by applying implicit style targeting the RadGalleryItem, like follows:
<Style TargetType="telerik:RadGalleryItem" >
    <Setter Property="Padding" Value="0" />
    <Setter Property="BorderThickness" Value="2" />
</Style>
You could try only setting the padding property to 0 and if there is still not enough space, you could reduce the BorderThickness of the RadGalleryItems.

I hope this information helps.

Kind regards,
Kiril Vandov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
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
Luke Daugherty
Top achievements
Rank 1
Answers by
Kiril Vandov
Telerik team
Share this question
or