Hello,
My client wants to command (navigate in) two timelines using one common zoombar. Is it possible to develop this?
If yes, how can I do please?
Thanks.
One way you can achieve this is by binding the ScrollPosition and ScrollScale properties of the Axis of one timeline to another. This way when one of the zoombar changes, the other will change too.
<ig:XamTimeline x:Name="Timeline1">
<ig:XamTimeline.Axis>
<ig:NumericTimeAxis
ScrollPosition="{Binding ElementName=Timeline2, Path=Axis.ScrollPosition, Mode=TwoWay}"
ScrollScale="{Binding ElementName=Timeline2, Path=Axis.ScrollScale, Mode=TwoWay}" />
</ig:XamTimeline.Axis>
</ig:XamTimeline>
<ig:XamTimeline x:Name="Timeline2">
If you want to use an external zoombar this is how it's done:
<ig:XamZoombar
x:Name="Zoombar"
ZoomChanged="Zoombar_ZoomChanged"/>
private void Zoombar_ZoomChanged(object sender, Infragistics.Controls.ZoomChangedEventArgs e)
{
Timeline1.Zoombar.Range = e.NewRange;
Timeline2.Zoombar.Range = e.NewRange;
}
You might want to hide the default zoombars of the timelines:
<Style x:Key="XamZoombarStyle" TargetType="ig:XamZoombar">
<Setter
Property="Visibility"
Value="Collapsed" />
</Style>
<ig:XamTimeline
x:Name="Timeline1"
ZoombarStyle="{StaticResource XamZoombarStyle}"
…
Thank you very much for this solution :).