aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.BrushPicker/Themes
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-03-05 20:33:02 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-03-05 20:33:02 +0200
commit7e6c673cc8b04086fa3c78cd1bf5e31085fd8cc8 (patch)
treec88947de8bdbea8c69e636ebcd8b8752cb61e870 /Software/Visual_Studio/Tango.BrushPicker/Themes
parent628819a1787290f84c22ecc7cb747f649fd54468 (diff)
downloadTango-7e6c673cc8b04086fa3c78cd1bf5e31085fd8cc8.tar.gz
Tango-7e6c673cc8b04086fa3c78cd1bf5e31085fd8cc8.zip
Working on color lab module !
Diffstat (limited to 'Software/Visual_Studio/Tango.BrushPicker/Themes')
-rw-r--r--Software/Visual_Studio/Tango.BrushPicker/Themes/Generic.xaml132
1 files changed, 65 insertions, 67 deletions
diff --git a/Software/Visual_Studio/Tango.BrushPicker/Themes/Generic.xaml b/Software/Visual_Studio/Tango.BrushPicker/Themes/Generic.xaml
index 5a5d7e843..5b1bcbbc3 100644
--- a/Software/Visual_Studio/Tango.BrushPicker/Themes/Generic.xaml
+++ b/Software/Visual_Studio/Tango.BrushPicker/Themes/Generic.xaml
@@ -8,7 +8,7 @@
License (Ms-PL) as published at http://colorbox.codeplex.com/license
*********************************************************************************** -->
-
+
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Tango.BrushPicker">
@@ -40,7 +40,7 @@
</Grid>
</VisualBrush.Visual>
</VisualBrush>
-
+
<Style TargetType="Path" x:Key="IconStyle">
<Setter Property="Height" Value="16"/>
<Setter Property="Width" Value="16"/>
@@ -54,8 +54,8 @@
<Setter Property="Margin" Value="2"/>
<Setter Property="Minimum" Value="0"/>
<Setter Property="Maximum" Value="1"/>
- </Style>
-
+ </Style>
+
<!-- Gradient Stop Thumb Style -->
<Style x:Key="SliderThumbStyle" TargetType="Thumb">
<Setter Property="SnapsToDevicePixels" Value="True" />
@@ -95,7 +95,7 @@
</Style>
-
+
<!-- ******* DoubleUpDown ******* -->
<Style x:Key="NumericUpDown" TargetType="{x:Type local:UpDownBase}">
@@ -163,9 +163,9 @@
</Setter>
</Style>
-
+
<!-- ******* ColorBox ******* -->
- <Style TargetType="{x:Type local:BrushPicker}">
+ <Style TargetType="{x:Type local:BrushPicker}">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Background" Value="#E7E8E8" />
@@ -173,7 +173,7 @@
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Template">
<Setter.Value>
- <ControlTemplate TargetType="{x:Type local:BrushPicker}">
+ <ControlTemplate TargetType="{x:Type local:BrushPicker}">
<Border x:Name="PART_Root"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
@@ -182,16 +182,23 @@
<KeyBinding Key="Delete" Command="{x:Static local:BrushPicker.RemoveGradientStop}"/>
</Border.InputBindings>
- <StackPanel Margin="5">
+ <Grid Margin="5">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="1*" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
- <StackPanel.Resources>
+ <Grid.Resources>
<Style x:Key="TBStyle" TargetType="TextBlock">
<Setter Property="Margin" Value="2"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
- </StackPanel.Resources>
-
- <ListBox x:Name="listAvailableBrushType"
+ </Grid.Resources>
+
+ <ListBox x:Name="listAvailableBrushType" Height="30" Visibility="{TemplateBinding BrushTypeVisibility}"
HorizontalContentAlignment="Center"
SelectedItem="{Binding BrushType, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
ItemsSource="{Binding AvailableBrushTypes, RelativeSource={RelativeSource TemplatedParent}}">
@@ -263,62 +270,54 @@
</ListBox.ItemContainerStyle>
</ListBox>
-
- <ScrollViewer Margin="0,5,0,5" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled" >
- <ScrollViewer.Style>
- <Style TargetType="ScrollViewer">
- <Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=listAvailableBrushType, Path=SelectedValue}" Value="None">
- <Setter Property="Visibility" Value="Collapsed"/>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ScrollViewer.Style>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="5" />
- <ColumnDefinition Width="20" />
- <ColumnDefinition Width="5" />
- <!--<ColumnDefinition Width="20" />-->
- </Grid.ColumnDefinitions>
+ <Grid Margin="0,5,0,5" Grid.Row="1">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="5" />
+ <ColumnDefinition Width="20" />
+ <ColumnDefinition Width="5" />
+ <!--<ColumnDefinition Width="20" />-->
+ </Grid.ColumnDefinitions>
- <!-- saturation / brightness selector -->
- <Grid Grid.Column="0" ClipToBounds="true">
- <local:SaturationBrightnessSelector x:Name="SV" MinHeight="128"
+ <!-- saturation / brightness selector -->
+ <Grid Grid.Column="0" ClipToBounds="true">
+
+ <Border BorderThickness="1" BorderBrush="DimGray">
+ <local:SaturationBrightnessSelector x:Name="SV" MinHeight="0"
Saturation="{Binding Path=Saturation,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
Brightness="{Binding Path=Brightness,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
Hue="{Binding ElementName=H,Path=Hue}"/>
+ </Border>
- <Grid VerticalAlignment="Top" HorizontalAlignment="Left" Margin="-6,-6,0,0" Width="12" Height="12" >
- <Ellipse Stroke="#000000" />
- <Ellipse Stroke="#FFFFFF" Margin="1" />
- <Grid.RenderTransform>
- <TranslateTransform X="{Binding ElementName=SV,Path=SaturationOffset}" Y="{Binding ElementName=SV,Path=BrightnessOffset}" />
- </Grid.RenderTransform>
- </Grid>
+ <Grid VerticalAlignment="Top" HorizontalAlignment="Left" Margin="-6,-6,0,0" Width="12" Height="12" >
+ <Ellipse Stroke="#000000" />
+ <Ellipse Stroke="#FFFFFF" Margin="1" />
+ <Grid.RenderTransform>
+ <TranslateTransform X="{Binding ElementName=SV,Path=SaturationOffset}" Y="{Binding ElementName=SV,Path=BrightnessOffset}" />
+ </Grid.RenderTransform>
</Grid>
+ </Grid>
- <!-- hue selector -->
- <local:HueSelector x:Name="H" Grid.Column="2"
+ <!-- hue selector -->
+ <local:HueSelector x:Name="H" Grid.Column="2"
Hue="{Binding Path=Hue,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" />
- <Path Grid.Column="2" HorizontalAlignment="Left" Margin="0,-5,0,5" Stroke="#FFFFFF" Fill="#000000" Data="M 0 0 L 7 5 L 0 10Z">
- <Path.RenderTransform>
- <TranslateTransform Y="{Binding ElementName=H,Path=HueOffset}" />
- </Path.RenderTransform>
- </Path>
- <Path Grid.Column="2" HorizontalAlignment="Right" Margin="0,-5,0,5" Stroke="#FFFFFF" Fill="#000000" Data="M 0 5 L 7 0 L 7 10 Z">
- <Path.RenderTransform>
- <TranslateTransform Y="{Binding ElementName=H,Path=HueOffset}" />
- </Path.RenderTransform>
- </Path>
+ <Path Grid.Column="2" HorizontalAlignment="Left" Margin="0,-5,0,5" Stroke="#FFFFFF" Fill="#000000" Data="M 0 0 L 7 5 L 0 10Z">
+ <Path.RenderTransform>
+ <TranslateTransform Y="{Binding ElementName=H,Path=HueOffset}" />
+ </Path.RenderTransform>
+ </Path>
+ <Path Grid.Column="2" HorizontalAlignment="Right" Margin="0,-5,0,5" Stroke="#FFFFFF" Fill="#000000" Data="M 0 5 L 7 0 L 7 10 Z">
+ <Path.RenderTransform>
+ <TranslateTransform Y="{Binding ElementName=H,Path=HueOffset}" />
+ </Path.RenderTransform>
+ </Path>
- <!-- alpha selector -->
- <!--<Rectangle Grid.Column="4" Fill="{StaticResource AlphaBrush}" />
+ <!-- alpha selector -->
+ <!--<Rectangle Grid.Column="4" Fill="{StaticResource AlphaBrush}" />
<local:AlphaSelector x:Name="A" Grid.Column="4"
Alpha="{Binding Path=Alpha,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" />-->
- <!--<Path Grid.Column="4" HorizontalAlignment="Left" Margin="0,-5,0,5" Stroke="#FFFFFF" Fill="#000000" Data="M 0 0 L 7 5 L 0 10Z">
+ <!--<Path Grid.Column="4" HorizontalAlignment="Left" Margin="0,-5,0,5" Stroke="#FFFFFF" Fill="#000000" Data="M 0 0 L 7 5 L 0 10Z">
<Path.RenderTransform>
<TranslateTransform Y="{Binding ElementName=A,Path=AlphaOffset}" />
</Path.RenderTransform>
@@ -328,10 +327,9 @@
<TranslateTransform Y="{Binding ElementName=A,Path=AlphaOffset}" />
</Path.RenderTransform>
</Path>-->
- </Grid>
- </ScrollViewer>
-
- <Grid Height="20">
+ </Grid>
+
+ <Grid Height="20" Grid.Row="2">
<!-- Hide when brush type is None -->
<Grid.Style>
@@ -356,7 +354,7 @@
</Rectangle.Fill>
</Rectangle>
- <TextBox x:Name="PART_CurrentColor"
+ <TextBox x:Name="PART_CurrentColor" Visibility="Collapsed"
Text="{Binding Color, RelativeSource={RelativeSource TemplatedParent}}"
local:TextBoxBehavior.SelectAllTextOnFocus="True"
Grid.Column="2" MinWidth="100" >
@@ -378,8 +376,8 @@
</TextBox>
</Grid>
-
- <Grid Margin="0,5,0,0" Focusable="False">
+
+ <Grid Margin="0,5,0,0" Focusable="False" Grid.Row="3">
<Grid.Style>
<Style TargetType="Grid">
@@ -523,8 +521,8 @@
</Button>-->
</Grid>
-
- <StackPanel Margin="0,5,0,0">
+
+ <StackPanel Margin="0,5,0,0" Grid.Row="4">
<StackPanel.Style>
<Style TargetType="StackPanel">
<Style.Triggers>
@@ -696,7 +694,7 @@
</StackPanel>
</StackPanel>
- </StackPanel>
+ </Grid>
</Border>
</ControlTemplate>
</Setter.Value>