I was wondering if there's a way to navigate records in a DataCarousel. So if I select a record that is in the top right of a circular path, it can be rotated round so that the selected item is then in the bottom centre.
I've looked through the help files but not yet found anything that actually works. The MoveFocus() command doesn't seem to have any effect.
Any help is much appreciated.
I would like to refer you to the following post thread:http://news.infragistics.com/forums/t/11079.aspx
As well as the following blog:http://blogs.infragistics.com/blogs/ctaylor/default.aspx
This will provide information about how to use the CarouselPanelCommands. The links talk about programming the XamCarouselListBox. However, the code examples also apply to scrolling the XamDataCarousel as both controls utilize the XamCarouselPanel.
Hello Curtis,
How we can programatically scroll XamDataPresenter..? I want to scroll XamDataPresenter which I used as List. The list contain number of records, I want to scroll them once down and then up completely. OR can I refresh the XamDataPresenter any way...? Is there any method available for refreshing the XamDataPresenter..?
Thanks,
Chetan Deshmukh
Hi. To cause the XamDataCarousel to auto-scroll to a specific position (like the cover flow UI in iTunes), you will need to write a little code.
First you will need to get the XamCarouselPanel from the XamDataCarousel to access built-in navigation commands in the Panel control.
The following method will do just that. Pass in the XamDataCarousel control for the parameter to this method...
XamCarouselPanel GetCarouselPanel(Visual visual){ XamCarouselPanel foundPanel = default(XamCarouselPanel); for (int i = 0; i < VisualTreeHelper.GetChildrenCount(visual); i++) { Visual child = VisualTreeHelper.GetChild(visual, i) as Visual; if (child != null) { if (child is XamCarouselPanel && visual is ItemsPresenter) { object temp = child; foundPanel = (XamCarouselPanel)temp; } else foundPanel = GetCarouselPanel(child);
if (foundPanel != null) break; } } return foundPanel;}
Once you have the XamCarouselPanel, you can execute the Navigation commands found in the XamCarouselPanelCommands class. The following shows how to call this command once you have the carousel panel:
carouselPanel.ExecuteCommand(XamCarouselPanelCommands.NavigateToNextItem);
You will need to handle the events you wish to trigger the carousel scroll. You will then need to keep track of the position to scroll to. The following posts provide more infromation about scrolling a carousel and keeping track of it's positions:
http://forums.infragistics.com/forums/p/9945/46754.aspx#46754
http://forums.infragistics.com/forums/p/12323/46747.aspx#46747
That's exactly what I'm looking for - when a user clicks on an item, I would like the carousel to spin it to the middle of the path. Is this possible to do then?
Rob
It sounds like you would like to navigate the carousel to spin around based on an event in the data grid section of the content in a XamDataPresenter. Does this sound accurate?
Do you want the carousel to spin an item to the middle of the path?
Do you want this to happen as soon as the element grid receives focus or when the user mouses down on a specific area?