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
405
How to get all items (not just visible items) from a carousel panel
posted

Using a xamDataCarousel I get the panel using,

CarouselViewPanel viewPanel = (CarouselViewPanel)Utilities.GetDescendantFromType(_dataCarousel, typeof(CarouselViewPanel), true);

I need to attach context menu's to each item in the carousel. Say I have five items in the carousel and the carousel displays three at a time. If I iterate over the viewPanel.ChildElements, I can only attach context menus to the visible (3 in this case) items. How can I get all items (including one's not currently visible) for the viewPanel?

I tried using the DataRecord, dataRecord.Cells["Title].DataPresenter.ContextMenu, but that results on only one context menu for all the items in the carousel. I could populate the menu in the opening event but I wanted to have seperate menu for each item.

Thanks for any help,

Pat

Parents
No Data
Reply
  • 22015
    posted

    Hello Pat,

     Thank you for your post. I have been looking into it and I can suggest to use the CellsInViewChanged event. Handling this event you would be able to set a ContextMenu to the item, that comes into view. This way the CarouselItems would have different context menus.

    Please do not hesitate to let me know if you have any further questions on this matter.

Children