blob: 2188b7558a8dc69afc3815cfd465cc6bc3d1ee9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
<Window x:Class="Tango.UITests.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:colorpic="clr-namespace:Tango.ColorPickers;assembly=Tango.ColorPickers"
mc:Ignorable="d"
Title="MainWindow" Height="700" Width="800" DataContext="{Binding RelativeSource={RelativeSource Self}}" >
<Grid>
<TabControl Margin="5" TabStripPlacement="Top">
<TabControl.Resources>
<Style TargetType="TabPanel">
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style TargetType="TabItem" BasedOn="{StaticResource {x:Type TabItem}}">
<Setter Property="Padding" Value="20,2"></Setter>
</Style>
</TabControl.Resources>
<TabItem Header="HSB" Padding="5">
<Grid >
<Grid.Background>
<SolidColorBrush Color="{Binding ElementName=HSBPicker, Path=SelectedColor}"/>
</Grid.Background>
<StackPanel VerticalAlignment="Center" Orientation="Vertical">
<colorpic:HsbColorPicker x:Name="HSBPicker" H="230" B="100" S="50" Width="400" Height="400" Background="White" Foreground="Black" BorderBrush="Gainsboro" BorderThickness="0.8" ThumbHeight="24"/>
<TextBlock Background="LightGray" Margin="0 50 0 0" HorizontalAlignment="Center" Foreground="Black" Width="400" FontSize="24" Height="Auto" MinHeight="40" FontWeight="DemiBold">
<Run Text="RGB Color: " />
<Run Text="{Binding ElementName=HSBPicker, Path=SelectedColor}"/>
</TextBlock>
</StackPanel>
</Grid>
</TabItem>
<TabItem Header="RGB" Padding="5">
<Grid >
<Grid.Background>
<SolidColorBrush Color="{Binding ElementName=RGBPicker, Path=SelectedColor}"/>
</Grid.Background>
<StackPanel VerticalAlignment="Center" Orientation="Vertical">
<colorpic:RgbColorPicker x:Name="RGBPicker" SelectedColor="#5C3D99" Width="400" Height="300" Background="White" Foreground="Black" BorderBrush="Gainsboro" BorderThickness="0.8" ThumbHeight="16"/>
<TextBlock Margin="0 50 0 0" Background="LightGray" HorizontalAlignment="Center" Foreground="Black" Width="400" FontSize="24" Height="Auto" MinHeight="40" FontWeight="DemiBold">
<Run Text="RGB Color: " />
<Run Text="{Binding ElementName=RGBPicker, Path=SelectedColor}"/>
</TextBlock>
</StackPanel>
</Grid>
</TabItem>
<TabItem Header="CMYK" Padding="5">
<Grid >
<Grid.Background>
<SolidColorBrush Color="{Binding ElementName=CmykPicker, Path=SelectedColor}"/>
</Grid.Background>
<StackPanel VerticalAlignment="Center" Orientation="Vertical">
<colorpic:CmykColorPicker x:Name="CmykPicker" Cyan="60" Magenta="20" Yellow="80" Key="20" Width="400" Height="400" Background="White" Foreground="Black" BorderBrush="Gainsboro" BorderThickness="0.8" ThumbHeight="18"/>
<TextBlock Margin="0 50 0 0" HorizontalAlignment="Center" Background="LightGray" Foreground="Black" Width="400" FontSize="24" Height="Auto" MinHeight="40" FontWeight="DemiBold">
<Run Text="RGB Color: " />
<Run Text="{Binding ElementName=CmykPicker, Path=SelectedColor}"/>
</TextBlock>
</StackPanel>
</Grid>
</TabItem>
<TabItem Header="LAB" Padding="5">
<Grid >
<Grid.Background>
<SolidColorBrush Color="{Binding ElementName=LabPicker, Path=SelectedColor}"/>
</Grid.Background>
<StackPanel VerticalAlignment="Center" Orientation="Vertical">
<colorpic:LabColorPicker x:Name="LabPicker" L="50" A="-128" B="-128" Width="400" Height="400" Background="White" Foreground="Black" BorderBrush="Gainsboro" BorderThickness="0.8" ThumbHeight="18"/>
<TextBlock Margin="0 50 0 0" HorizontalAlignment="Center" Background="LightGray" Foreground="Black" Width="400" FontSize="24" Height="Auto" MinHeight="40" FontWeight="DemiBold">
<Run Text="RGB Color: " />
<Run Text="{Binding ElementName=LabPicker, Path=SelectedColor}"/>
</TextBlock>
</StackPanel>
</Grid>
</TabItem>
</TabControl>
<!--<controls:MultiSelectComboBox Width="250" Height="60" Background="White" Foreground="Black"
x:Name="MSCombobox"
BorderBrush="Gainsboro" BorderThickness="0.8"
Items="{Binding Items}"
SelectedItemsList ="{Binding SelectedItems}"/>-->
</Grid>
</Window>
|