Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1655
how to add images dynamically to xamCarouselPanel
posted

Right now we are  adding images to the xamcarouselpanel in the xaml code.

But I want to add them dynamically in codebehind file(C#).

How can I do this?

Parents
No Data
Reply
  • 69686
    Suggested Answer
    posted

    Hello,

    The XamCarouselPanel exposes a ChildElements collection which stores the elements in the CarouselPanel. You can add the images directly in this collection.

    xamCarouselPanel1.ChildElements.Add(new Button() { Content = "Button", Width = 100, Height = 100 });

    Hope this helps.

Children