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
185
Change Carousel's ItemPath during runtime - Via Code
posted

How do I change the ItemPath within the C# code.  We want to make the XAMDataCarousel a control with some constructor properties so that it will be a vertical or horizontal carousel.  I have both of them laid out as I want them in the XAML, I'm just having a hard time change it.

Parents
  • 69686
    posted

    Hello,

    As you have defined them in the XAML, you can get them as resources and apply them to the ViewSettings.ItemPath property of the xamDataCarousel.

    Here is an example how to get the path from the XamDataCarousel.Resources section and apply it to the carousel:

     xamDataCarousel1.ViewSettings.ItemPath = xamDataCarousel1.Resources["path1"] as Path;

    Hope this helps,

    Alex.

Reply Children
No Data