no stretch

3 posts, 1 answers
  1. Mohamadreza
    Mohamadreza avatar
    8 posts
    Member since:
    Jul 2013

    Posted 12 Feb 2014 Link to this post

    i have a radbinary image:
    <telerik:RadBinaryImage ID="RadBinaryImage1" runat="server" Width="340px"
                   Height="340px" AutoAdjustImageControlSize="False" ResizeMode="Fit"/>
    and show images dynamically:
    Protected Sub RadButton2_Click(sender As Object, e As EventArgs) Handles RadButton2.Click
          Dim fac As printeryFalow = Session("invoiceData")
          RadBinaryImage1.ImageUrl = physicalToVirtualAddress(MsccRemoteProxyServer.clsGivers.getJpeg(fac.printeryInvoiceId))
      End Sub
    but always showing all images in stretch mode. i want to show images in true ratio. i tested all options in resizemode property, but every options work the same.
  2. Answer
    Vasil avatar
    1604 posts

    Posted 17 Feb 2014 Link to this post

    Hello Mohamadreza,

    The ResizeMode apply when the RadBinaryImage is bound to a DataSource. In this case the control reads the bytes for the image, and can do modifications of the image. When the browser request this image, the RadBinaryImage control will provide the modified version.

    ResizeMode can not work when bound with ImageUrl, because in this case the control does not operate with the actual image, it only sends the URL to your browser, and the browser request it.

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
  3. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Feb 2014 in reply to Mohamadreza Link to this post

    Hi Mohamadreza,

    Please try to set AutoAdjustImageControlSize property of RadBinaryImage as true. this property scales the image based on explicitly set width/height dimensions to avoid stretch or blur effect when its original dimensions do not fit.

Back to Top