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
120
Multiple timelines with one zoombar
posted

Is it possible to have 2 or more timelines hooked up to the movement of only one zoombar?

Parents
No Data
Reply
  • 17605
    Verified Answer
    posted

    One way to achieve this is to hide the Zoombar from the Timelines and to add a separate Zoombar. You can try:

    <UserControl x:Class="SilverlightApplication1.MainPage"

        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

        xmlns:igTimeline="clr-namespace:Infragistics.Silverlight.Timeline;assembly=Infragistics.Silverlight.DataVisualization.Timeline.v9.2"

        xmlns:igControls="clr-namespace:Infragistics.Silverlight.Controls;assembly=Infragistics.Silverlight.DataVisualization.Controls.v9.2"

        Width="700" Height="500">

        <Grid x:Name="LayoutRoot" Background="White">

            <Grid.Resources>

                <Style x:Name="ZoombarStyle" TargetType="igControls:XamWebZoombar">

                    <Setter Property="Visibility" Value="Collapsed" />

                </Style>

            </Grid.Resources>

            <Grid.RowDefinitions>

                <RowDefinition />

                <RowDefinition />

                <RowDefinition Height="70" />

            </Grid.RowDefinitions>

           

            <igTimeline:XamWebTimeline x:Name="Timeline1"

                                       ZoombarStyle="{StaticResource ZoombarStyle}">

            </igTimeline:XamWebTimeline>

           

            <igTimeline:XamWebTimeline x:Name="Timeline2"

                                       ZoombarStyle="{StaticResource ZoombarStyle}"

                                       Grid.Row="1">

            </igTimeline:XamWebTimeline>

           

            <igControls:XamWebZoombar x:Name="Zoombar"

                                      Grid.Row="2"

                                      ZoomChanged="Zoombar_ZoomChanged">           

            </igControls:XamWebZoombar>

           

        </Grid>

    </UserControl>

     

     

    private void Zoombar_ZoomChanged(object sender, Infragistics.Silverlight.Controls.ZoomChangedEventArgs e)

    {

    this.Timeline1.Axis.ScrollPosition = e.NewRange.Scroll;

          this.Timeline1.Axis.ScrollScale = e.NewRange.Scale;

     

          this.Timeline2.Axis.ScrollPosition = e.NewRange.Scroll;

          this.Timeline2.Axis.ScrollScale = e.NewRange.Scale;

    }

Children