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
xamDataCarousel as a menu
posted

We are attempting to prototype using the xamDataCarousel as a menu device. I've produced a simple prototype but I am having trouble determining if it can be styled as follows:

(1) Say there are four items and the ItemsPerPage=3 and IsListContinuous=false. Initially items 1 to 3 are displayed, when the user navigates right items 2 to 4 are displayed. We want further navigation to the right to have no effect. That is, we always want three items displayed, once user is at end (or beginning) of data no more scrolling should occur. I can't figure out if this is possible.

(2) How can the navigation control be styled. Could we have the "left" navigation buttons appear at the beginning of the displayed items and the "right" navigation buttons at the end of the displayed items? Sort of like, <<  <  Item1  Item2  Item3  > >>

(3) If (2) isn't possible, how can the navigator be positioned centered below the displayed items?

(4) The data source is hierarchical. But only some of the items have child records. How can the child selector be disabled on the parent item so that it doesn't navigate to the breadcrumb child page? Even more desirable for us, can a click on the selector be trapped and instead we pop up a list of the items children records? 

I've attached prototype if you want to see a rough idea of what we are attempting.

Thank you for any help,

Pat

DataCarouselFun.zip
Parents
  • 34510
    Verified Answer
    Offline posted

    Hi Pat,

    1.) There's no built-in way to do this but it is possible.  You will need to grab the CarouselViewPanel and handle it's ExecutingCommand event.  This event will fire every time the user clicks on one of the buttons in the navigator.  You can then check which command was fired and cancel the command when needed.  I've modified your original sample to demonstrate how this would work.

    2.) This would require retemplating the navigator control.  In the attached sample I've created a ResourceDictionary for the navigator control that places the buttons as you require.

    3.) See 2

    4.) In order to hide the expansion indicators when there are no children, please see: http://es.infragistics.com/community/forums/t/44847.aspx

    XamDataGrid and XamDataCarousel both derive from the same base class so this code will work with the carousel.  Just replace XamDataGrid with XamDataCarousel.  As for capturing when a user clicks on the expansion indicator for records that do have children, you can use the RecordExpanding event.

    Let me know if you have any questions on this.

    DataCarouselFun.zip
Reply Children