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

AutoSize of huge images in ImageArea

1 Answer 138 Views
ImageGallery
This is a migrated thread and some comments may be shown as answers.
HMPSOLBB
Top achievements
Rank 1
HMPSOLBB asked on 25 Jul 2016, 09:17 AM

I bound a datattable datasource to the RadImageGallery, therea huge images with a size > FullHD. I want to show the images with a size of maxX=800 and/or maxY=800. The aspx code looks like this

<telerik:RadImageGallery  runat="server" ID="IGAL1" DisplayAreaMode="LightBox" width="800px"
                OnNeedDataSource="IGAL1_NeedDataSource" DataDescriptionField="BEMERKUNG" DataImageField="DOKUMENT_BLOB" DataTitleField="NAME" LoopItems="true" ShowLoadingPanel="true" >
                    <ToolbarSettings ShowSlideshowButton="true" ShowItemsCounter="true" ItemsCounterFormat="Images {0} of {1}" />
                    <ImageAreaSettings ShowDescriptionBox="true"  Height="800px" Width="800px" ResizeMode="Fit" CloseButtonText="Schließen" NextImageButtonText="Nächstes Bild" PrevImageButtonText="Vorheriges Bild" />
                    <ThumbnailsAreaSettings  ThumbnailsSpacing="1px" ThumbnailWidth="120px" ThumbnailHeight="80px" Height="80px" ShowScrollbar="true" ShowScrollButtons="true" />
 
            </telerik:RadImageGallery>

If I click on a thumbnail the popup always fits the whole screen and ignore the width and hight settings of the RadImagegallery.

Someone gots a hint for me???

 

regs

Oliver

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 28 Jul 2016, 08:27 AM
Hello Oliver,

For setting the width and the height of the LightBox you should set the values for the ListBox control in the code-behind:
protected void Page_Load(object sender, EventArgs e)
{
    IGAL1.LightBox.Width = Unit.Pixel(800);
    IGAL1.LightBox.Height = Unit.Pixel(600);
}

Hope this helps.


Regards,
Konstantin Dikov
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
ImageGallery
Asked by
HMPSOLBB
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or