Using ImageDraw with RadRotator

2 posts, 0 answers
  1. ClarkSRoberts
    ClarkSRoberts avatar
    27 posts
    Member since:
    Mar 2007

    Posted 21 May 2009 Link to this post

    I am trying to include an ImageDraw (Neodynamic) item in a RadRotator template. To use this object, I need to be able to access it through the Item_DataBound event. However, I cannot get "FindInControl" to function. Is there any way to do this?

        Protected Sub RadRotator1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadRotatorEventArgs) Handles RadRotator1.ItemDataBound 
     
            Dim ImgElem As New ImageElement 
     
            Dim IDraw As Neodynamic.WebControls.ImageDraw.ImageDraw = RadRotator1.FindControl("ImageDraw1") 
            Dim labelPath As System.Web.UI.WebControls.Label = RadRotator1.FindControl("lblPath") 
            Dim labelUrl As System.Web.UI.WebControls.Label = RadRotator1.FindControl("lblUrl") 
     
            Dim Shadow As New Neodynamic.WebControls.ImageDraw.DropShadow 
            Shadow.Color = Drawing.Color.DimGray 
            Dim ResizeH As New Neodynamic.WebControls.ImageDraw.Resize 
            Dim ResizeW As New Neodynamic.WebControls.ImageDraw.Resize 
     
            ImgElem = ImageElement.FromFile(labelPath.Text.ToString) 
            ImgElem.Actions.Add(Shadow) 
            If ImgElem.Height > 400 Then 
                ResizeH.Height = 400 
                ResizeH.LockAspectRatio = LockAspectRatio.HeightBased 
                ImgElem.Actions.Add(ResizeH) 
            End If 
     
            If ImgElem.Width > 600 Then 
                ResizeW.Width = 600 
                ResizeW.LockAspectRatio = LockAspectRatio.WidthBased 
                ImgElem.Actions.Add(ResizeW) 
            End If 
            IDraw.Elements.Add(ImgElem) 
     
     
        End Sub 

  2. ClarkSRoberts
    ClarkSRoberts avatar
    27 posts
    Member since:
    Mar 2007

    Posted 21 May 2009 Link to this post

    I figured it out. 
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top