diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml | 72 |
1 files changed, 52 insertions, 20 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml index 4c39bded0..dfbd47514 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml @@ -12,6 +12,7 @@ d:DesignHeight="60" d:DesignWidth="500" Height="38" d:DataContext="{d:DesignInstance Type=local:RunningJobViewerEureka, IsDesignTimeCreatable=False}"> <UserControl.Resources> <converters:DoubleWidthConverter x:Key="DoubleWidthConverter" /> + <converters:ProgressBorderWidthConverter x:Key="ProgressBorderWidthConverter" /> </UserControl.Resources> <Grid> <touch:SliderContentControl x:Name="slider_control" ThumbColor="{StaticResource TangoPrimaryAccentColor}" @@ -37,28 +38,59 @@ </Border.Clip> <Grid> <Canvas x:Name="ColorCanvas" Width="{Binding ElementName=slider_control, Path=ActualWidth}" Height="{Binding ElementName=slider_control, Path=ActualHeight}" ClipToBounds="True" > - <Border x:Name="ItemsBorder" ClipToBounds="False" Margin="0 0 0 0" Height="{Binding ElementName=slider_control, Path=ActualHeight}" Width="{Binding ElementName=brush_border, Path=ActualWidth, Converter={StaticResource DoubleWidthConverter}}" > - <ItemsControl x:Name="SegmentsItemsControl" ClipToBounds="False" > - <ItemsControl.ItemsPanel> - <ItemsPanelTemplate> - <StackPanel Orientation="Horizontal" ClipToBounds="False"></StackPanel> - </ItemsPanelTemplate> - </ItemsControl.ItemsPanel> - <ItemsControl.ItemTemplate> - <DataTemplate> + <Border x:Name="ItemsBorder" ClipToBounds="False" Margin="0 0 0 0" Height="{Binding ElementName=slider_control, Path=ActualHeight}" > + <Grid ClipToBounds="False" HorizontalAlignment="Stretch" > + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto"/> + <ColumnDefinition Width="1*"/> + </Grid.ColumnDefinitions> <Grid> - <Grid.Width> - <MultiBinding Converter="{StaticResource SegmentLengthToWidthConverter}"> - <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="RunningJobStatus.CurrentUnitTotalProgress" Converter="{StaticResource DoubleWidthConverter}"></Binding> - <Binding RelativeSource="{RelativeSource AncestorType=ItemsControl}" Path="ActualWidth"></Binding> - <Binding Path="LengthWithFactor"></Binding> - </MultiBinding> - </Grid.Width> - <Rectangle Fill="{Binding SegmentBrush}"></Rectangle> + <ItemsControl HorizontalAlignment="Left" x:Name="SegmentsItemsControl" Width="{Binding ElementName=brush_border, Path=ActualWidth, Converter={StaticResource DoubleWidthConverter}}"> + <ItemsControl.ItemsPanel> + <ItemsPanelTemplate> + <StackPanel Orientation="Horizontal" ></StackPanel> + </ItemsPanelTemplate> + </ItemsControl.ItemsPanel> + <ItemsControl.ItemTemplate> + <DataTemplate> + <Grid> + <Grid.Width> + <MultiBinding Converter="{StaticResource SegmentLengthToWidthConverter}"> + <Binding RelativeSource="{RelativeSource AncestorType=local:RunningJobViewerEureka}" Path="JobUnitLength" Converter="{StaticResource DoubleWidthConverter}"></Binding> + <Binding RelativeSource="{RelativeSource AncestorType=ItemsControl}" Path="ActualWidth"></Binding> + <Binding Path="LengthWithFactor"></Binding> + </MultiBinding> + </Grid.Width> + <Rectangle Fill="{Binding SegmentBrush}"></Rectangle> + </Grid> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> </Grid> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> + <Grid Grid.Column="1"> + <ItemsControl x:Name="LastSegmentsItemsControl" HorizontalAlignment="Right" Margin="0 0 0 0" Width="{Binding ElementName=brush_border, Path=ActualWidth}"> + <ItemsControl.ItemsPanel> + <ItemsPanelTemplate> + <StackPanel Orientation="Horizontal" ></StackPanel> + </ItemsPanelTemplate> + </ItemsControl.ItemsPanel> + <ItemsControl.ItemTemplate> + <DataTemplate> + <Grid> + <Grid.Width> + <MultiBinding Converter="{StaticResource SegmentLengthToWidthConverter}"> + <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="RunningJobStatus.CurrentUnitTotalProgress" ></Binding> + <Binding RelativeSource="{RelativeSource AncestorType=ItemsControl}" Path="ActualWidth"></Binding> + <Binding Path="LengthWithFactor"></Binding> + </MultiBinding> + </Grid.Width> + <Rectangle Fill="{Binding SegmentBrush}"></Rectangle> + </Grid> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </Grid> + </Grid> </Border> </Canvas> <Rectangle Stroke="{StaticResource TangoGrayBrush}" StrokeThickness="1" StrokeDashArray="5 5 5 5" RadiusX="7" RadiusY="7" /> |
