diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-19 14:32:56 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-19 14:32:56 +0300 |
| commit | 24a77fd5e03c81c6b0e901da02bce4bdccd4c71c (patch) | |
| tree | 3c91c5ab36a01608a8b21862ed8bc80eb7b9e8ee /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/TimelineView.xaml | |
| parent | b8cae8fcfe37cee8df17d0e8ccfbf2b3ac8c2152 (diff) | |
| download | Tango-24a77fd5e03c81c6b0e901da02bce4bdccd4c71c.tar.gz Tango-24a77fd5e03c81c6b0e901da02bce4bdccd4c71c.zip | |
Fixed a bug with logging module display timeline..
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/TimelineView.xaml')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/TimelineView.xaml | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/TimelineView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/TimelineView.xaml index 1046fa4e8..664f2489c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/TimelineView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/TimelineView.xaml @@ -68,23 +68,24 @@ </Grid> - <ItemsControl ItemsSource="{Binding TimelineEventGroups}" Grid.Column="0" Grid.Row="1" Margin="0 0 0 0" Background="#FCFCFC" Height="{Binding ElementName=scrollViewer,Path=ViewportHeight}" VerticalAlignment="Top"> - <ItemsControl.ItemsPanel> - <ItemsPanelTemplate> - <UniformGrid Columns="1" /> - </ItemsPanelTemplate> - </ItemsControl.ItemsPanel> - <ItemsControl.ItemTemplate> - <DataTemplate DataType="{x:Type vm:TimelineEventGroup}"> - <Border BorderThickness="1 0.5 1 0.5" BorderBrush="{StaticResource AccentColorBrush}" Margin="2 0 0 0" Padding="5"> + <ScrollViewer x:Name="scroll_channels" Grid.Column="0" Grid.Row="1" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"> + <ItemsControl ItemsSource="{Binding TimelineEventGroups}" Margin="0 0 0 0" Background="#FCFCFC" VerticalAlignment="Top"> + <ItemsControl.ItemsPanel> + <ItemsPanelTemplate> + <StackPanel /> + </ItemsPanelTemplate> + </ItemsControl.ItemsPanel> + <ItemsControl.ItemTemplate> + <DataTemplate DataType="{x:Type vm:TimelineEventGroup}"> + <Border BorderThickness="1 0.5 1 0.5" BorderBrush="{StaticResource AccentColorBrush}" Margin="2 0 0 0" Padding="5" Height="{Binding Height,Mode=OneWay}"> + <TextBlock Text="{Binding Name}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="22" TextWrapping="Wrap" TextAlignment="Center" FontWeight="SemiBold" Foreground="{StaticResource AccentColorBrush}"></TextBlock> + </Border> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </ScrollViewer> - <TextBlock Text="{Binding Name}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="22" TextWrapping="Wrap" TextAlignment="Center" FontWeight="SemiBold" Foreground="{StaticResource AccentColorBrush}"></TextBlock> - </Border> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> - - <localControls:TimelineScrollViewer x:Name="scrollViewer" Grid.Column="1" Grid.Row="1" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Auto"> + <localControls:TimelineScrollViewer x:Name="scrollViewer" Grid.Column="1" Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" ScrollChanged="scrollViewer_ScrollChanged"> <Grid HorizontalAlignment="Left"> <ItemsControl ItemsSource="{Binding TimelineEventGroups}" HorizontalAlignment="Left" MinWidth="{Binding RelativeSource={RelativeSource AncestorType=localControls:TimelineScrollViewer},Path=ActualWidth}"> <ItemsControl.Width> @@ -101,15 +102,15 @@ <ItemsControl.ItemTemplate> <DataTemplate DataType="{x:Type vm:TimelineEventGroup}"> <Border BorderThickness="0 0 0 1" BorderBrush="#98DEFF" Margin="0 0 0 0"> - <ItemsControl ItemsSource="{Binding Events}"> + <ItemsControl ItemsSource="{Binding Events}" SizeChanged="ItemsControl_SizeChanged"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> - <UniformGrid IsItemsHost="True" Columns="1"></UniformGrid> + <StackPanel IsItemsHost="True"></StackPanel> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate DataType="{x:Type entities:MachinesEvent}"> - <Canvas Margin="0 5 0 5" MinHeight="20"> + <Canvas Margin="0 0 0 0" MinHeight="20"> <Grid Height="{Binding RelativeSource={RelativeSource AncestorType=Canvas},Path=ActualHeight}"> <Canvas.Left> <MultiBinding Converter="{StaticResource MachineEventToXConverter}"> |
