AutoSize of huge images in ImageArea

2 posts, 0 answers
    HMPSOLBB avatar
    15 posts
    Member since:
    Mar 2012

    Posted 25 Jul Link to this post

    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" />

    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???




  2. Konstantin Dikov
    Konstantin Dikov avatar
    1750 posts

    Posted 28 Jul Link to this post

    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.

    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top