Carousel - Images

3 posts, 0 answers
  1. chaily pardes
    chaily pardes avatar
    6 posts
    Member since:
    Aug 2009

    Posted 18 Aug 2009 Link to this post

    We want to buy your product so we try it now to see if it's feet us.
    we want a carousel with images,The images will be added in runtime
    here is my code:



    radB = new RadButtonElement();




    Image Image = SaveBitmap(f); //My Faunction which returns an image


    radB.CanFocus =





    radB.DisplayStyle = Telerik.WinControls.






    radB.Image = Image;

    radB.Name =





    radB.Text =








    FillPrimitive)(radB.GetChildAt(0))).Visibility = Telerik.WinControls.ElementVisibility.Hidden;




    BorderPrimitive)(radB.GetChildAt(2))).Visibility = Telerik.WinControls.ElementVisibility.Hidden;





    the Problem Is that the Image is to big and when I set it smaller it is cut...
    how can I set an AutoSize and Stretch Image to RadButtonElement ?
    Thank You,



  2. Peter
    Peter avatar
    1148 posts

    Posted 18 Aug 2009 Link to this post

    Hi chaily pardes,

    Thank you for writing.Yes, you can set the button element AutoSize to True -- in this case the button element size will be equal to the image size:

    radB.AutoSize = true

    Also, you can re-size images to proper sizes using this line of code:

    radB.Image = new Bitmap( SaveBitmap(f), 20,20);  

    I hope this helps. Don't hesitate to contact us if you have other questions.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. chaily pardes
    chaily pardes avatar
    6 posts
    Member since:
    Aug 2009

    Posted 19 Aug 2009 Link to this post

    Thank you
Back to Top