Hello
I would like to use the time period selected in the xamtimeline control to impact the data displayed in other controls on my page, e.g. the data shown in the map. How can I retrieve the start datetime and the end datetime selected in xamtimeline?
You can use the Axis ActualMinimum/Maximum VisibleMinimum/Maximum properties. Try looking at this post too:
http://community.infragistics.com/forums/p/30980/170877.aspx#170877
Thanks. Which event can I use to trigger fetching the start and end points?
Unfortunately, the Timeline doesn’t fire such events. The thing you can do is handle the Zoombar events. Try using this code:
void MainPage_LayoutUpdated(object sender, EventArgs e) { XamZoombar zoombar = FindZoombar(this.timeline1); zoombar.ZoomChanged += new EventHandler<ZoomChangedEventArgs>(zoombar_ZoomChanged); zoombar.ZoomChanging += new EventHandler<ZoomChangeEventArgs>(zoombar_ZoomChanging); this.LayoutUpdated -= MainPage_LayoutUpdated; } private void zoombar_ZoomChanging(object sender, ZoomChangeEventArgs e) { } private void zoombar_ZoomChanged(object sender, ZoomChangedEventArgs e) { } private XamZoombar FindZoombar(DependencyObject parent) { XamZoombar zoombar = null; int count = VisualTreeHelper.GetChildrenCount(parent); for (int i = 0; i < count; i++) { DependencyObject obj = VisualTreeHelper.GetChild(parent, i); zoombar = obj as XamZoombar; if (zoombar != null) { return zoombar; } zoombar = FindZoombar(obj); if (zoombar != null) { return zoombar; } } return zoombar; }
Hi Teodor
Have tried using your code. I may be missing a reference or using statement. Am getting these errors:
The type or namespace name 'ZoomChangeEventArgs' could not be found (are you missing a using directive or assembly reference?)
The type or namespace name 'ZoomChangedEventArgs' could not be found (are you missing a using directive or assembly reference?)
The type or namespace name 'XamZoombar' could not be found (are you missing a using directive or assembly reference?)
I have the following references:
InfragisticsSL4.Controls.Timelines.Xam.Timeline.v10.3
InfragisticsSL4.DataVisualization.v10.3
and the following using statements:
...
using Infragistics;using Infragistics.Controls.Maps;using Infragistics.Controls.Timelines;
Please advise?
Actually I just discovered it - I needed 'using Infragistics.Controls'