diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-05 17:10:35 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-05 17:10:35 +0200 |
| commit | 4717b98b45c9e40e1329d3b49b91bfbd3feb50f6 (patch) | |
| tree | 681ac14996def4efa7b5c2cc2d3e773466045319 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml | |
| parent | ba49db54c7b94315a55bed9ae10fe06e7a65cd33 (diff) | |
| download | Tango-4717b98b45c9e40e1329d3b49b91bfbd3feb50f6.tar.gz Tango-4717b98b45c9e40e1329d3b49b91bfbd3feb50f6.zip | |
Optimized color conversion frequency on research module.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml | 383 |
1 files changed, 192 insertions, 191 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml index 9151cbaa0..b9c27e4f9 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml @@ -242,6 +242,191 @@ </Setter.Value> </Setter> </Style> + + <DataTemplate x:Key="Volume_Template"> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> + <StackPanel VerticalAlignment="Center"> + <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center"> + <ItemsControl.ItemsPanel> + <ItemsPanelTemplate> + <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel> + </ItemsPanelTemplate> + </ItemsControl.ItemsPanel> + <ItemsControl.ItemTemplate> + <DataTemplate> + <Border> + <Border.Style> + <Style TargetType="Border"> + <Setter Property="Visibility" Value="Visible"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding IdsPack.IdsPackFormula.Name}" Value="Lubricant"> + <Setter Property="Visibility" Value="Collapsed"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Border.Style> + <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Margin="10 0 0 0" Width="60" Height="60"> + <ContentControl.Foreground> + <SolidColorBrush Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush> + </ContentControl.Foreground> + <mahapps:NumericUpDown ValueChanged="OnBrushStopFieldValueChanged" FontSize="{StaticResource NumbersFontSize}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> + <mahapps:NumericUpDown.Resources> + <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource> + </mahapps:NumericUpDown.Resources> + </mahapps:NumericUpDown> + </ContentControl> + </Border> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + + <StackPanel Orientation="Horizontal" Margin="30 10 0 0" Height="16" Visibility="{Binding IsLiquidVolumesOutOfRange,Converter={StaticResource BooleanToVisibilityConverter}}"> + <materialDesign:PackIcon Kind="Alert" Foreground="#FFAC3C" /> + <TextBlock Margin="5 0 0 0" Foreground="#FFAC3C">Liquid volumes exceeds the maximum range for color conversion!</TextBlock> + </StackPanel> + </StackPanel> + + <materialDesign:PackIcon Kind="ChevronDoubleLeft" Margin="40 2 0 0" VerticalAlignment="Center" Foreground="Gray" /> + + <TextBlock VerticalAlignment="Center" FontSize="16" Margin="5 0 0 0" FontStyle="Italic" Foreground="Gray"> + <Run>Total:</Run> + <Run Text="{Binding TotalLiquidVolume,Mode=OneWay,StringFormat=0}"></Run><Run>%</Run> + <Run>(</Run> + <Run FontSize="10" Text="{Binding TotalLiquidNanoliterPerCentimeter,Mode=OneWay,StringFormat=0.00}"></Run> + <Run FontSize="12">nl</Run> + <Run>)</Run> + </TextBlock> + + <Border Margin="60 0 0 0" DataContext="{Binding LiquidVolumes,Converter={StaticResource LiquidVolumesToLubricantLiquidVolume}}" BorderBrush="#E6E6E6" BorderThickness="1 0 0 0"> + <Border.Style> + <Style TargetType="Border"> + <Setter Property="Visibility" Value="Collapsed"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding Converter={StaticResource NullObjectToBooleanConverter}}" Value="True"> + <Setter Property="Visibility" Value="Visible"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Border.Style> + <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Margin="10 0 0 0" Width="55" Height="55"> + <ContentControl.Foreground> + <SolidColorBrush Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush> + </ContentControl.Foreground> + <mahapps:NumericUpDown Foreground="#515151" ScrollViewer.HorizontalScrollBarVisibility="Disabled" FontSize="20" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> + <mahapps:NumericUpDown.Resources> + <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource> + </mahapps:NumericUpDown.Resources> + </mahapps:NumericUpDown> + </ContentControl> + </Border> + </StackPanel> + </DataTemplate> + + <DataTemplate x:Key="RGB_Template"> + <StackPanel> + <StackPanel Orientation="Horizontal"> + <ContentControl Style="{StaticResource numberBorder}" Foreground="#FF6F6F" Width="60" Height="60" Margin="10 0 0 0"> + <mahapps:NumericUpDown ValueChanged="OnBrushStopFieldValueChanged" FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource 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> + </ContentControl> + + <ContentControl Style="{StaticResource numberBorder}" Foreground="#92FF92" Width="60" Height="60" Margin="10 0 0 0"> + <mahapps:NumericUpDown ValueChanged="OnBrushStopFieldValueChanged" FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource 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> + </ContentControl> + + <ContentControl Style="{StaticResource numberBorder}" Foreground="#3C7EF4" BorderThickness="1" Width="60" Height="60" Margin="10 0 0 0"> + <mahapps:NumericUpDown ValueChanged="OnBrushStopFieldValueChanged" FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource 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> + </ContentControl> + + <ContentControl Style="{StaticResource colorPicker}"></ContentControl> + </StackPanel> + + <StackPanel Orientation="Horizontal" Margin="30 10 0 0" Height="16" Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}"> + <materialDesign:PackIcon Kind="Alert" Foreground="#FF6D6D" /> + <TextBlock Margin="5 0 0 0" Foreground="#FF6D6D">Color is out of gamut!</TextBlock> + </StackPanel> + </StackPanel> + </DataTemplate> + + <DataTemplate x:Key="LAB_Template"> + <StackPanel Orientation="Horizontal"> + <ContentControl Style="{StaticResource numberBorder}" Foreground="Gray" Width="60" Height="60" Margin="10 0 0 0"> + <mahapps:NumericUpDown ValueChanged="OnBrushStopFieldValueChanged" FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding L, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.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> + </ContentControl> + + <ContentControl Style="{StaticResource numberBorder}" Foreground="#FF8A8A" Width="60" Height="60" Margin="10 0 0 0"> + <mahapps:NumericUpDown ValueChanged="OnBrushStopFieldValueChanged" FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding A, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.0" HideUpDownButtons="True" Minimum="-128" Maximum="128" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> + <mahapps:NumericUpDown.Resources> + <Style TargetType="TextBox"/> + </mahapps:NumericUpDown.Resources> + </mahapps:NumericUpDown> + </ContentControl> + + <ContentControl Style="{StaticResource numberBorder}" Foreground="#92FF92" Width="60" Height="60" Margin="10 0 0 0"> + <mahapps:NumericUpDown ValueChanged="OnBrushStopFieldValueChanged" FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding B, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.0" HideUpDownButtons="True" Minimum="-128" Maximum="128" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> + <mahapps:NumericUpDown.Resources> + <Style TargetType="TextBox"/> + </mahapps:NumericUpDown.Resources> + </mahapps:NumericUpDown> + </ContentControl> + + <ContentControl Style="{StaticResource colorPicker}"></ContentControl> + </StackPanel> + </DataTemplate> + + <DataTemplate x:Key="CMYK_Template"> + <StackPanel Orientation="Horizontal"> + <ContentControl Style="{StaticResource numberBorder}" Foreground="Cyan" Width="60" Height="60" Margin="10 0 0 0"> + <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Cyan,Converter={StaticResource OneToPercentConverter}, 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> + </ContentControl> + + <ContentControl Style="{StaticResource numberBorder}" Foreground="Magenta" Width="60" Height="60" Margin="10 0 0 0"> + <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Magenta,Converter={StaticResource OneToPercentConverter}, 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> + </ContentControl> + + <ContentControl Style="{StaticResource numberBorder}" Foreground="Yellow" Width="60" Height="60" Margin="10 0 0 0"> + <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Yellow,Converter={StaticResource OneToPercentConverter}, 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> + </ContentControl> + + <ContentControl Style="{StaticResource numberBorder}" Foreground="Black" Width="60" Height="60" Margin="10 0 0 0"> + <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Black,Converter={StaticResource OneToPercentConverter}, 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> + </ContentControl> + + <ContentControl Style="{StaticResource colorPicker}"></ContentControl> + </StackPanel> + </DataTemplate> + </UserControl.Resources> <Grid> @@ -718,210 +903,26 @@ </Border.Style> <Grid> <DockPanel> - <ContentControl DockPanel.Dock="Left"> + <ContentControl DockPanel.Dock="Left" Content="{Binding}"> <ContentControl.Style> <Style TargetType="ContentControl"> - <Setter Property="Content"> + <Setter Property="ContentTemplate"> <Setter.Value> - <Rectangle/> + <DataTemplate/> </Setter.Value> </Setter> <Style.Triggers> <DataTrigger Binding="{Binding ColorSpace.Name}" Value="Volume"> - <Setter Property="Content"> - <Setter.Value> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <StackPanel VerticalAlignment="Center"> - <ItemsControl ItemsSource="{Binding LiquidVolumes}" VerticalAlignment="Center"> - <ItemsControl.ItemsPanel> - <ItemsPanelTemplate> - <StackPanel VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel> - </ItemsPanelTemplate> - </ItemsControl.ItemsPanel> - <ItemsControl.ItemTemplate> - <DataTemplate> - <Border> - <Border.Style> - <Style TargetType="Border"> - <Setter Property="Visibility" Value="Visible"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding IdsPack.IdsPackFormula.Name}" Value="Lubricant"> - <Setter Property="Visibility" Value="Collapsed"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </Border.Style> - <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Margin="10 0 0 0" Width="60" Height="60"> - <ContentControl.Foreground> - <SolidColorBrush Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush> - </ContentControl.Foreground> - <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> - <mahapps:NumericUpDown.Resources> - <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource> - </mahapps:NumericUpDown.Resources> - </mahapps:NumericUpDown> - </ContentControl> - </Border> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> - - <StackPanel Orientation="Horizontal" Margin="30 10 0 0" Height="16" Visibility="{Binding IsLiquidVolumesOutOfRange,Converter={StaticResource BooleanToVisibilityConverter}}"> - <materialDesign:PackIcon Kind="Alert" Foreground="#FFAC3C" /> - <TextBlock Margin="5 0 0 0" Foreground="#FFAC3C">Liquid volumes exceeds the maximum range for color conversion!</TextBlock> - </StackPanel> - </StackPanel> - - <materialDesign:PackIcon Kind="ChevronDoubleLeft" Margin="40 2 0 0" VerticalAlignment="Center" Foreground="Gray" /> - - <TextBlock VerticalAlignment="Center" FontSize="16" Margin="5 0 0 0" FontStyle="Italic" Foreground="Gray"> - <Run>Total:</Run> - <Run Text="{Binding TotalLiquidVolume,Mode=OneWay,StringFormat=0}"></Run><Run>%</Run> - <Run>(</Run> - <Run FontSize="10" Text="{Binding TotalLiquidNanoliterPerCentimeter,Mode=OneWay,StringFormat=0.00}"></Run> - <Run FontSize="12">nl</Run> - <Run>)</Run> - </TextBlock> - - <Border Margin="60 0 0 0" DataContext="{Binding LiquidVolumes,Converter={StaticResource LiquidVolumesToLubricantLiquidVolume}}" BorderBrush="#E6E6E6" BorderThickness="1 0 0 0"> - <Border.Style> - <Style TargetType="Border"> - <Setter Property="Visibility" Value="Collapsed"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding Converter={StaticResource NullObjectToBooleanConverter}}" Value="True"> - <Setter Property="Visibility" Value="Visible"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </Border.Style> - <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Margin="10 0 0 0" Width="55" Height="55"> - <ContentControl.Foreground> - <SolidColorBrush Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush> - </ContentControl.Foreground> - <mahapps:NumericUpDown Foreground="#515151" ScrollViewer.HorizontalScrollBarVisibility="Disabled" FontSize="20" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> - <mahapps:NumericUpDown.Resources> - <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource> - </mahapps:NumericUpDown.Resources> - </mahapps:NumericUpDown> - </ContentControl> - </Border> - </StackPanel> - </Setter.Value> - </Setter> + <Setter Property="ContentTemplate" Value="{StaticResource Volume_Template}" /> </DataTrigger> <DataTrigger Binding="{Binding ColorSpace.Name}" Value="RGB"> - <Setter Property="Content"> - <Setter.Value> - <StackPanel> - <StackPanel Orientation="Horizontal"> - <ContentControl Style="{StaticResource numberBorder}" Foreground="#FF6F6F" Width="60" Height="60" Margin="10 0 0 0"> - <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource 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> - </ContentControl> - - <ContentControl Style="{StaticResource numberBorder}" Foreground="#92FF92" Width="60" Height="60" Margin="10 0 0 0"> - <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource 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> - </ContentControl> - - <ContentControl Style="{StaticResource numberBorder}" Foreground="#3C7EF4" BorderThickness="1" Width="60" Height="60" Margin="10 0 0 0"> - <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource 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> - </ContentControl> - - <ContentControl Style="{StaticResource colorPicker}"></ContentControl> - </StackPanel> - - <StackPanel Orientation="Horizontal" Margin="30 10 0 0" Height="16" Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}"> - <materialDesign:PackIcon Kind="Alert" Foreground="#FF6D6D" /> - <TextBlock Margin="5 0 0 0" Foreground="#FF6D6D">Color is out of gamut!</TextBlock> - </StackPanel> - </StackPanel> - </Setter.Value> - </Setter> + <Setter Property="ContentTemplate" Value="{StaticResource RGB_Template}" /> </DataTrigger> <DataTrigger Binding="{Binding ColorSpace.Name}" Value="CMYK"> - <Setter Property="Content"> - <Setter.Value> - <StackPanel Orientation="Horizontal"> - <ContentControl Style="{StaticResource numberBorder}" Foreground="Cyan" Width="60" Height="60" Margin="10 0 0 0"> - <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Cyan,Converter={StaticResource OneToPercentConverter}, 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> - </ContentControl> - - <ContentControl Style="{StaticResource numberBorder}" Foreground="Magenta" Width="60" Height="60" Margin="10 0 0 0"> - <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Magenta,Converter={StaticResource OneToPercentConverter}, 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> - </ContentControl> - - <ContentControl Style="{StaticResource numberBorder}" Foreground="Yellow" Width="60" Height="60" Margin="10 0 0 0"> - <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Yellow,Converter={StaticResource OneToPercentConverter}, 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> - </ContentControl> - - <ContentControl Style="{StaticResource numberBorder}" Foreground="Black" Width="60" Height="60" Margin="10 0 0 0"> - <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Black,Converter={StaticResource OneToPercentConverter}, 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> - </ContentControl> - - <ContentControl Style="{StaticResource colorPicker}"></ContentControl> - </StackPanel> - </Setter.Value> - </Setter> + <Setter Property="ContentTemplate" Value="{StaticResource CMYK_Template}" /> </DataTrigger> <DataTrigger Binding="{Binding ColorSpace.Name}" Value="LAB"> - <Setter Property="Content"> - <Setter.Value> - <StackPanel Orientation="Horizontal"> - <ContentControl Style="{StaticResource numberBorder}" Foreground="Gray" Width="60" Height="60" Margin="10 0 0 0"> - <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding L, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.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> - </ContentControl> - - <ContentControl Style="{StaticResource numberBorder}" Foreground="#FF8A8A" Width="60" Height="60" Margin="10 0 0 0"> - <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding A, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.0" HideUpDownButtons="True" Minimum="-128" Maximum="128" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> - <mahapps:NumericUpDown.Resources> - <Style TargetType="TextBox"/> - </mahapps:NumericUpDown.Resources> - </mahapps:NumericUpDown> - </ContentControl> - - <ContentControl Style="{StaticResource numberBorder}" Foreground="#92FF92" Width="60" Height="60" Margin="10 0 0 0"> - <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding B, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0.0" HideUpDownButtons="True" Minimum="-128" Maximum="128" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center"> - <mahapps:NumericUpDown.Resources> - <Style TargetType="TextBox"/> - </mahapps:NumericUpDown.Resources> - </mahapps:NumericUpDown> - </ContentControl> - - <ContentControl Style="{StaticResource colorPicker}"></ContentControl> - </StackPanel> - </Setter.Value> - </Setter> + <Setter Property="ContentTemplate" Value="{StaticResource LAB_Template}" /> </DataTrigger> </Style.Triggers> </Style> |
