aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-01-29 18:45:10 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-01-29 18:45:10 +0200
commit5cda8b0a3ab579dd6f33b1cb19a1d295dc661d28 (patch)
treeef9408ca50840d407f3c62bbcd19147739fde145 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
parent7e8ff4c3ca798d426eb6f381c5312a747f1bb800 (diff)
downloadTango-5cda8b0a3ab579dd6f33b1cb19a1d295dc661d28.tar.gz
Tango-5cda8b0a3ab579dd6f33b1cb19a1d295dc661d28.zip
Added gradient display of color Brush Stops.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml492
1 files changed, 279 insertions, 213 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
index 73c00fea8..9c761309c 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
@@ -19,7 +19,7 @@
xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI"
xmlns:local="clr-namespace:Tango.MachineStudio.Developer.Views"
mc:Ignorable="d"
- d:DesignHeight="1080" d:DesignWidth="1920" Background="White" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=True}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+ d:DesignHeight="1080" d:DesignWidth="1920" Background="White" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
<UserControl.Resources>
<Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
@@ -35,6 +35,7 @@
<localConverters:BrushStopToColorConverter x:Key="BrushStopToColorConverter" />
<localConverters:BrushStopCMYKToColorConverter x:Key="BrushStopCMYKToColorConverter" />
<localConverters:BrushStopLabToColorConverter x:Key="BrushStopLabToColorConverter" />
+ <localConverters:SegmentToGradientStopsConverter x:Key="SegmentToGradientStopsConverter" />
<SolidColorBrush x:Key="SideBarBackground" Color="#F9F9F9">
@@ -73,6 +74,40 @@
</Style.Triggers>
</Style>
+ <Style x:Key="brushStopBorder" TargetType="Border">
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <ScaleTransform ScaleX="1" ScaleY="1"></ScaleTransform>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="RenderTransformOrigin" Value="0.5,0.5"></Setter>
+ <Setter Property="Background" Value="Transparent"></Setter>
+ <Setter Property="dragAndDrop:DragAndDropService.Droppable" Value="True"></Setter>
+ <Setter Property="dragAndDrop:DragAndDropService.Draggable" Value="True"></Setter>
+ <Setter Property="dragAndDrop:DragAndDropService.DraggingSurface" Value="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DraggingSurface}"></Setter>
+ <Style.Triggers>
+ <Trigger Property="dragAndDrop:DragAndDropService.IsDraggableOver" Value="True">
+ <Setter Property="Opacity" Value="0.5"></Setter>
+ <Trigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation To="0.95" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleX"></DoubleAnimation>
+ <DoubleAnimation To="0.95" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleY"></DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.EnterActions>
+ <Trigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation To="1" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleX"></DoubleAnimation>
+ <DoubleAnimation To="1" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleY"></DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.ExitActions>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+
<Style x:Key="draggableGrid" TargetType="Grid">
<Setter Property="RenderTransform">
<Setter.Value>
@@ -102,6 +137,18 @@
</Setter.Value>
</Setter>
</Style>
+
+ <Style TargetType="ContentControl" x:Key="colorPicker">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate>
+ <colorPicker:ColorPickerCombo SelectedColorChanged="ColorPickerCombo_SelectedColorChanged" SelectedColor="{Binding Color,Mode=TwoWay}" Margin="30 0 0 0" VerticalAlignment="Center" Width="100" BorderBrush="{StaticResource AccentColorBrush}" Background="White">
+
+ </colorPicker:ColorPickerCombo>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
</UserControl.Resources>
<Grid>
@@ -295,7 +342,7 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="234*"/>
- <RowDefinition x:Name="graphRowDefinition" Height="161*"/>
+ <RowDefinition x:Name="graphRowDefinition" Height="440"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="173*"/>
@@ -448,7 +495,7 @@
</Button>
</StackPanel>
- <ListBox ItemsSource="{Binding SelectedJob.Segments}" SelectedItem="{Binding SelectedSegment}">
+ <ListBox SelectionChanged="ListBox_SelectionChanged" ItemsSource="{Binding SelectedJob.Segments}" SelectedItem="{Binding SelectedSegment}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="0 5 0 0">
@@ -503,10 +550,18 @@
<Grid Margin="0 20 0 0">
<DockPanel>
- <StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
- <Image Source="../Images/color-palette.png" Width="42"></Image>
- <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" Foreground="DimGray" FontSize="16" FontWeight="SemiBold">SEGMENT BRUSH</TextBlock>
- </StackPanel>
+ <Grid DockPanel.Dock="Top">
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
+ <Image Source="../Images/color-palette.png" Width="42"></Image>
+ <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" Foreground="DimGray" FontSize="16" FontWeight="SemiBold">SEGMENT BRUSH</TextBlock>
+ </StackPanel>
+
+ <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Center" Height="8" Margin="200 0 80 0" StrokeThickness="1" Stroke="Gainsboro">
+ <Rectangle.Fill>
+ <LinearGradientBrush StartPoint="0,0" EndPoint="1,0" x:Name="gradientBrush"></LinearGradientBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ </Grid>
<Grid Margin="0 10 0 0">
<ListBox Style="{x:Null}" ScrollViewer.CanContentScroll="False" BorderThickness="0" ItemsSource="{Binding SelectedSegment.BrushStops}" SelectedItem="{Binding SelectedBrushStop}" HorizontalContentAlignment="Stretch">
<ListBox.ItemContainerStyle>
@@ -516,224 +571,203 @@
</ListBox.ItemContainerStyle>
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type observables:BrushStop}">
- <Border BorderThickness="1" CornerRadius="5" Margin="0 0 0 5" Padding="10">
- <Border.Style>
- <Style TargetType="Border">
- <Setter Property="BorderBrush" Value="{StaticResource SideBarBackground}"></Setter>
- <Setter Property="Background" Value="White"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="True">
- <Setter Property="BorderBrush" Value="Gainsboro"></Setter>
- <Setter Property="Background" Value="{StaticResource SideBarBackground}"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Border.Style>
- <Grid>
- <DockPanel>
- <ContentControl DockPanel.Dock="Left">
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Setter Property="Content">
- <Setter.Value>
- <Rectangle/>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding ColorSpace.Name}" Value="Volume">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel VerticalAlignment="Center">
- <ItemsControl ItemsSource="{Binding InkVolumes}" VerticalAlignment="Center">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0">
- <Border.BorderBrush>
- <SolidColorBrush Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
- </Border.BorderBrush>
- <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.0" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
- <mahapps:NumericUpDown.Resources>
- <Style TargetType="TextBox"/>
- </mahapps:NumericUpDown.Resources>
- </mahapps:NumericUpDown>
- </Border>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </StackPanel>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding ColorSpace.Name}" Value="RGB">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel Orientation="Horizontal">
- <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="#FF6F6F">
- <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding Red, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="255" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Center">
- <mahapps:NumericUpDown.Resources>
- <Style TargetType="TextBox"/>
- </mahapps:NumericUpDown.Resources>
- </mahapps:NumericUpDown>
- </Border>
+
+ <Border BorderThickness="1" CornerRadius="5" Margin="0 0 0 5" Padding="10" Background="Transparent" dragAndDrop:DragAndDropService.Drop="OnBrushStopBorderDrop">
+ <Border.Style>
+ <Style TargetType="Border" BasedOn="{StaticResource brushStopBorder}">
+ <Setter Property="BorderBrush" Value="{StaticResource SideBarBackground}"></Setter>
+ <Setter Property="Background" Value="White"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="True">
+ <Setter Property="BorderBrush" Value="Gainsboro"></Setter>
+ <Setter Property="Background" Value="{StaticResource SideBarBackground}"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ <Grid>
+ <DockPanel>
+ <ContentControl DockPanel.Dock="Left">
+ <ContentControl.Style>
+ <Style TargetType="ContentControl">
+ <Setter Property="Content">
+ <Setter.Value>
+ <Rectangle/>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding ColorSpace.Name}" Value="Volume">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel VerticalAlignment="Center">
+ <ItemsControl ItemsSource="{Binding InkVolumes}" VerticalAlignment="Center">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0">
+ <Border.BorderBrush>
+ <SolidColorBrush Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
+ </Border.BorderBrush>
+ <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.0" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown.Resources>
+ <Style TargetType="TextBox"/>
+ </mahapps:NumericUpDown.Resources>
+ </mahapps:NumericUpDown>
+ </Border>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding ColorSpace.Name}" Value="RGB">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel Orientation="Horizontal">
+ <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="#FF6F6F">
+ <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding Red, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="255" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown.Resources>
+ <Style TargetType="TextBox"/>
+ </mahapps:NumericUpDown.Resources>
+ </mahapps:NumericUpDown>
+ </Border>
- <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="#92FF92">
- <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding Green, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="255" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Center">
- <mahapps:NumericUpDown.Resources>
- <Style TargetType="TextBox"/>
- </mahapps:NumericUpDown.Resources>
- </mahapps:NumericUpDown>
- </Border>
+ <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="#92FF92">
+ <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding Green, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="255" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown.Resources>
+ <Style TargetType="TextBox"/>
+ </mahapps:NumericUpDown.Resources>
+ </mahapps:NumericUpDown>
+ </Border>
- <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="#3C7EF4">
- <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding Blue, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="255" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Center">
- <mahapps:NumericUpDown.Resources>
- <Style TargetType="TextBox"/>
- </mahapps:NumericUpDown.Resources>
- </mahapps:NumericUpDown>
- </Border>
+ <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="#3C7EF4">
+ <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding Blue, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="255" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown.Resources>
+ <Style TargetType="TextBox"/>
+ </mahapps:NumericUpDown.Resources>
+ </mahapps:NumericUpDown>
+ </Border>
- <colorPicker:ColorPickerCombo Margin="30 0 0 0" VerticalAlignment="Center" Width="100" BorderBrush="{StaticResource AccentColorBrush}" Background="White">
- <colorPicker:ColorPickerCombo.SelectedColor>
- <MultiBinding Converter="{StaticResource BrushStopToColorConverter}">
- <Binding Path="Red"></Binding>
- <Binding Path="Green"></Binding>
- <Binding Path="Blue"></Binding>
- </MultiBinding>
- </colorPicker:ColorPickerCombo.SelectedColor>
- </colorPicker:ColorPickerCombo>
- </StackPanel>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding ColorSpace.Name}" Value="CMYK">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel Orientation="Horizontal">
- <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="Cyan">
- <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding Cyan, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
- <mahapps:NumericUpDown.Resources>
- <Style TargetType="TextBox"/>
- </mahapps:NumericUpDown.Resources>
- </mahapps:NumericUpDown>
- </Border>
+ <ContentControl Style="{StaticResource colorPicker}"></ContentControl>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding ColorSpace.Name}" Value="CMYK">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel Orientation="Horizontal">
+ <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="Cyan">
+ <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding Cyan, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown.Resources>
+ <Style TargetType="TextBox"/>
+ </mahapps:NumericUpDown.Resources>
+ </mahapps:NumericUpDown>
+ </Border>
- <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="Magenta">
- <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding Magenta, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
- <mahapps:NumericUpDown.Resources>
- <Style TargetType="TextBox"/>
- </mahapps:NumericUpDown.Resources>
- </mahapps:NumericUpDown>
- </Border>
+ <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="Magenta">
+ <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding Magenta, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown.Resources>
+ <Style TargetType="TextBox"/>
+ </mahapps:NumericUpDown.Resources>
+ </mahapps:NumericUpDown>
+ </Border>
- <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="Yellow">
- <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding Yellow, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
- <mahapps:NumericUpDown.Resources>
- <Style TargetType="TextBox"/>
- </mahapps:NumericUpDown.Resources>
- </mahapps:NumericUpDown>
- </Border>
+ <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="Yellow">
+ <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding Yellow, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown.Resources>
+ <Style TargetType="TextBox"/>
+ </mahapps:NumericUpDown.Resources>
+ </mahapps:NumericUpDown>
+ </Border>
- <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="Black">
- <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding Black, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
- <mahapps:NumericUpDown.Resources>
- <Style TargetType="TextBox"/>
- </mahapps:NumericUpDown.Resources>
- </mahapps:NumericUpDown>
- </Border>
+ <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="Black">
+ <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding Black, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown.Resources>
+ <Style TargetType="TextBox"/>
+ </mahapps:NumericUpDown.Resources>
+ </mahapps:NumericUpDown>
+ </Border>
- <Rectangle Margin="30 0 0 0" Width="50" Height="50" StrokeThickness="1" Stroke="Gray">
- <Rectangle.Fill>
- <SolidColorBrush>
- <SolidColorBrush.Color>
- <MultiBinding Converter="{StaticResource BrushStopCMYKToColorConverter}">
- <Binding Path="Cyan"></Binding>
- <Binding Path="Magenta"></Binding>
- <Binding Path="Yellow"></Binding>
- <Binding Path="Black"></Binding>
- </MultiBinding>
- </SolidColorBrush.Color>
- </SolidColorBrush>
- </Rectangle.Fill>
- </Rectangle>
- </StackPanel>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding ColorSpace.Name}" Value="LAB">
- <Setter Property="Content">
- <Setter.Value>
- <StackPanel Orientation="Horizontal">
- <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="Gray">
- <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding L, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.0" HideUpDownButtons="True" Minimum="-100" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
- <mahapps:NumericUpDown.Resources>
- <Style TargetType="TextBox"/>
- </mahapps:NumericUpDown.Resources>
- </mahapps:NumericUpDown>
- </Border>
+ <Rectangle Margin="30 0 0 0" Width="50" Height="50" StrokeThickness="1" Stroke="Gray">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="{Binding Color}">
+ </SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding ColorSpace.Name}" Value="LAB">
+ <Setter Property="Content">
+ <Setter.Value>
+ <StackPanel Orientation="Horizontal">
+ <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="Gray">
+ <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding L, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.0" HideUpDownButtons="True" Minimum="-100" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown.Resources>
+ <Style TargetType="TextBox"/>
+ </mahapps:NumericUpDown.Resources>
+ </mahapps:NumericUpDown>
+ </Border>
- <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="#FF8A8A">
- <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding A, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.0" HideUpDownButtons="True" Minimum="-100" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
- <mahapps:NumericUpDown.Resources>
- <Style TargetType="TextBox"/>
- </mahapps:NumericUpDown.Resources>
- </mahapps:NumericUpDown>
- </Border>
+ <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="#FF8A8A">
+ <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding A, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.0" HideUpDownButtons="True" Minimum="-100" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown.Resources>
+ <Style TargetType="TextBox"/>
+ </mahapps:NumericUpDown.Resources>
+ </mahapps:NumericUpDown>
+ </Border>
- <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="#FFFF8A">
- <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding B, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.0" HideUpDownButtons="True" Minimum="-100" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
- <mahapps:NumericUpDown.Resources>
- <Style TargetType="TextBox"/>
- </mahapps:NumericUpDown.Resources>
- </mahapps:NumericUpDown>
- </Border>
+ <Border BorderThickness="1" Width="50" Height="50" CornerRadius="50" Margin="10 0 0 0" BorderBrush="#FFFF8A">
+ <mahapps:NumericUpDown FontSize="14" FontFamily="digital-7" HorizontalAlignment="Center" Value="{Binding B, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.0" HideUpDownButtons="True" Minimum="-100" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown.Resources>
+ <Style TargetType="TextBox"/>
+ </mahapps:NumericUpDown.Resources>
+ </mahapps:NumericUpDown>
+ </Border>
- <Rectangle Margin="30 0 0 0" Width="50" Height="50" StrokeThickness="1" Stroke="Gray">
- <Rectangle.Fill>
- <SolidColorBrush>
- <SolidColorBrush.Color>
- <MultiBinding Converter="{StaticResource BrushStopLabToColorConverter}">
- <Binding Path="L"></Binding>
- <Binding Path="A"></Binding>
- <Binding Path="B"></Binding>
- </MultiBinding>
- </SolidColorBrush.Color>
- </SolidColorBrush>
- </Rectangle.Fill>
- </Rectangle>
- </StackPanel>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
- </ContentControl>
+ <Rectangle Margin="30 0 0 0" Width="50" Height="50" StrokeThickness="1" Stroke="Gray">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="{Binding Color}">
+ </SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ </StackPanel>
+ </Setter.Value>
+ </Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ContentControl.Style>
+ </ContentControl>
- <Grid DockPanel.Dock="Right">
- <Border Style="{StaticResource JobFieldBorder}">
- <StackPanel Margin="5" Width="140">
- <StackPanel Orientation="Horizontal">
- <Image Source="../Images/colorspace.png" Width="24"></Image>
- <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Color Space</TextBlock>
+ <Grid DockPanel.Dock="Right">
+ <Border Style="{StaticResource JobFieldBorder}">
+ <StackPanel Margin="5" Width="140">
+ <StackPanel Orientation="Horizontal">
+ <Image Source="../Images/colorspace.png" Width="24"></Image>
+ <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Color Space</TextBlock>
+ </StackPanel>
+ <ComboBox ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Adapter.ColorSpaces}" SelectedItem="{Binding ColorSpace}" DisplayMemberPath="Name"></ComboBox>
</StackPanel>
- <ComboBox ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.Adapter.ColorSpaces}" SelectedItem="{Binding ColorSpace}" DisplayMemberPath="Name"></ComboBox>
+ </Border>
+ </Grid>
+ <Grid>
+ <StackPanel VerticalAlignment="Center">
+ <TextBlock Width="150" TextAlignment="Center" HorizontalAlignment="Center"><Run FontWeight="Bold" FontStyle="Italic" Text="OFFSET:"></Run> <Run FontFamily="digital-7" Text="{Binding OffsetPercent,StringFormat={}{0:F1}%}"></Run></TextBlock>
+ <Slider ValueChanged="Offset_Slider_ValueChanged" Margin="0 5 0 0" HorizontalAlignment="Center" Width="150" Minimum="0" Maximum="100" Value="{Binding OffsetPercent}"></Slider>
</StackPanel>
- </Border>
- </Grid>
- <Grid>
- <StackPanel VerticalAlignment="Center">
- <TextBlock Width="150" TextAlignment="Center" HorizontalAlignment="Center"><Run FontWeight="Bold" FontStyle="Italic" Text="OFFSET:"></Run> <Run FontFamily="digital-7" Text="{Binding OffsetPercent,StringFormat={}{0:F1}%}"></Run></TextBlock>
- <Slider Margin="0 5 0 0" HorizontalAlignment="Center" Width="150" Minimum="0" Maximum="100" Value="{Binding OffsetPercent}"></Slider>
- </StackPanel>
- </Grid>
- </DockPanel>
- </Grid>
- </Border>
+ </Grid>
+ </DockPanel>
+ </Grid>
+ </Border>
+
</DataTemplate>
</ItemsControl.ItemTemplate>
</ListBox>
@@ -821,6 +855,7 @@
</Grid>
</Grid>
+
</Grid>
<Grid Grid.Row="1" Grid.ColumnSpan="2" Background="{StaticResource SideBarBackground}">
@@ -940,7 +975,37 @@
<TextBlock VerticalAlignment="Center" Margin="5 -1 0 0" Foreground="Gray">Show Graphs</TextBlock>
</StackPanel>
</Border>
- <dragAndDrop:DraggingSurface x:Name="draggingSurface" />
+ </Grid>
+
+ <Grid Grid.ColumnSpan="3" Background="White" Visibility="Collapsed">
+ <Grid.Style>
+ <Style TargetType="Grid">
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <ScaleTransform ScaleY="1" ScaleX="0"></ScaleTransform>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsSideBarOpened}" Value="True">
+ <DataTrigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="00:00:0.5"></DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.EnterActions>
+ <DataTrigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="0" Duration="00:00:0.5"></DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.ExitActions>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Grid.Style>
+ <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="40">MONITORING</TextBlock>
</Grid>
</Grid>
</Grid>
@@ -1113,5 +1178,6 @@
</Button>
</Grid>
+ <dragAndDrop:DraggingSurface x:Name="draggingSurface" />
</Grid>
</UserControl>