Is it possible to have 2 or more timelines hooked up to the movement of only one zoombar?
This is interesting point. This is possible with changing the Timeline style. You can try using:
<UserControl x:Class="SilverlightApplication5.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.1"
xmlns:igControls="clr-namespace:Infragistics.Silverlight.Controls;assembly=Infragistics.Silverlight.DataVisualization.Controls.v9.1"
Width="700" Height="500">
<Grid x:Name="LayoutRoot" Background="White">
<Grid.Resources>
<Style x:Name="TimelineStyle" TargetType="igTimeline:XamWebTimeline">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="igTimeline:XamWebTimeline">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<igTimeline:Title Content="{TemplateBinding Title}"
Style="{TemplateBinding TitleStyle}" />
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<RowDefinition Height="Auto"/>
<igTimeline:Scene x:Name="SceneElement" Height="1"
Style="{TemplateBinding SceneStyle}"
Grid.Column="0" Margin="5" />
<Canvas x:Name="DetailsPaneElement" />
</Grid>
<igTimeline:Legend x:Name="LegendElement"
Visibility="Collapsed"
Grid.Column="1"
Margin="10,0,0,0"/>
<Grid x:Name="ZoombarPanelElement"
Height="70"
Grid.Row="1" />
<igTimeline:MessageControl x:Name="MessageControlElement"
Style="{TemplateBinding MessageControlStyle}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Grid.Resources>
<igTimeline:XamWebTimeline Style="{StaticResource TimelineStyle}" Height="70" >
<igTimeline:XamWebTimeline.Series>
<igTimeline:DateTimeSeries Title="Series 1" >
<igTimeline:DateTimeSeries.Entries>
<igTimeline:DateTimeEntry Title="Series1 Entry 1" Time="07:00 01/01/2000" Duration="3:00" />
<igTimeline:DateTimeEntry Title="Series1 Entry 2" Time="12:00 01/01/2000" Duration="2:00" />
</igTimeline:DateTimeSeries.Entries>
</igTimeline:DateTimeSeries>
<igTimeline:DateTimeSeries Title="Series 2" Fill="Red" Position="BottomOrRight">
<igTimeline:DateTimeEntry Title="Series2 Entry 1" Time="09:00 01/01/2000" Duration="2:00" />
<igTimeline:DateTimeEntry Title="Series1 Entry 1" Time="14:00 01/01/2000" Duration="1:00" />
</igTimeline:XamWebTimeline.Series>
</igTimeline:XamWebTimeline>
</UserControl>
Could you please send us URL link to your application when you deploy it?
Thank you.
One last question, and I have tried many things before bugging you, but how do I hide, not the zoombar, but the top part of the Timeline. I want to be able to show a zoombar with the time intervals but not the top part, meaning the pane, thumb , event titles.
If i create just a zoombar, there is no way to make it show a line across it with the time series.
thank you,
best regards
Angel
Currently, you can't access the Zoombar in the Timeline directly, but you can try using the following code:
public partial class MainPage : UserControl
{
public MainPage()
InitializeComponent();
}
private bool Initialized { get; set; }
private XamWebZoombar FindZoombar(DependencyObject parent)
XamWebZoombar zoombar = null;
int count = VisualTreeHelper.GetChildrenCount(parent);
for (int i = 0; i < count; i++)
DependencyObject obj = VisualTreeHelper.GetChild(parent, i);
zoombar = obj as XamWebZoombar;
if (zoombar != null)
return zoombar;
zoombar = FindZoombar(obj);
private void UserControl_LayoutUpdated(object sender, EventArgs e)
if (this.Initialized)
return;
XamWebZoombar zoombar = FindZoombar(this.Timeline);
zoombar.ZoomChanged += new EventHandler<ZoomChangedEventArgs>(zoombar_ZoomChanged);
zoombar.ZoomChanging += new EventHandler<ZoomChangeEventArgs>(zoombar_ZoomChanging);
this.Initialized = true;
private void zoombar_ZoomChanging(object sender, ZoomChangeEventArgs e)
private void zoombar_ZoomChanged(object sender, ZoomChangedEventArgs e)
Thanks for reporting this. We'll try including this in next hotfix.
Hello. I can not access the zoombar of my Timeline ? Why ?
It used to be as easy as calling the Timeline's Zoombar property.
Please help. I would love to capture the zoom event change arguments ...
regards
Angel Bruzos
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: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"
<Style x:Name="ZoombarStyle" TargetType="igControls:XamWebZoombar">
<Setter Property="Visibility" Value="Collapsed" />
<RowDefinition />
<RowDefinition Height="70" />
<igTimeline:XamWebTimeline x:Name="Timeline1"
ZoombarStyle="{StaticResource ZoombarStyle}">
<igTimeline:XamWebTimeline x:Name="Timeline2"
ZoombarStyle="{StaticResource ZoombarStyle}"
Grid.Row="1">
<igControls:XamWebZoombar x:Name="Zoombar"
Grid.Row="2"
ZoomChanged="Zoombar_ZoomChanged">
</igControls:XamWebZoombar>
…
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;