aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/CatalogSelectionView.xaml
blob: 5863255158b9e40a8230f14dce8140f35d160fd6 (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
<UserControl x:Class="Tango.PPC.Jobs.Dialogs.CatalogSelectionView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Tango.PPC.Jobs.Dialogs"
             xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL"
             xmlns:converters="clr-namespace:Tango.PPC.Jobs.Converters"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
             mc:Ignorable="d" 
             Background="{StaticResource TangoPrimaryBackgroundBrush}"  d:DesignHeight="555" d:DesignWidth="560" Width="570" Height="700" d:DataContext="{d:DesignInstance Type=local:CatalogSelectionViewVM, IsDesignTimeCreatable=False}">

    <UserControl.Resources>
        <converters:JobTypeToImageConverter x:Key="JobTypeToImageConverter" />
        <converters:ColorSpaceToImageConverter x:Key="ColorSpaceToImageConverter" />

    </UserControl.Resources>

    <Grid Margin="20">

        <DockPanel>
            <Grid DockPanel.Dock="Bottom">
                <touch:TouchButton HorizontalAlignment="Left" CornerRadius="25" Command="{Binding CloseCommand}" Style="{StaticResource TangoHollowButton}" Width="150" Height="50" VerticalAlignment="Bottom">CANCEL</touch:TouchButton>
                <touch:TouchButton HorizontalAlignment="Right" CornerRadius="25" Command="{Binding OKCommand}" Style="{StaticResource TangoHollowButton}" Width="150" Height="50" VerticalAlignment="Bottom">CREATE</touch:TouchButton>
            </Grid>

            <StackPanel DockPanel.Dock="Top">
                <TextBlock HorizontalAlignment="Left" Margin="0 10 0 0" FontSize="{StaticResource TangoHeaderFontSize}">Select Catalog</TextBlock>
                <TextBlock Margin="0 30 100 0" HorizontalAlignment="Left" TextWrapping="Wrap" FontSize="{StaticResource TangoTitleFontSize}">Please select the desired color catalog and press 'create'.</TextBlock>
            </StackPanel>

            <touch:LightTouchScrollViewer Margin="0 20 0 0">
                <touch:TouchStaticListBox Margin="20 0 20 20" HorizontalAlignment="Center" Width="480" ItemsSource="{Binding Catalogs}" SelectedItem="{Binding SelectedCatalog,Mode=TwoWay}">
                <touch:TouchStaticListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <WrapPanel Orientation="Horizontal" />
                    </ItemsPanelTemplate>
                </touch:TouchStaticListBox.ItemsPanel>
                <touch:TouchStaticListBox.ItemContainerStyle>
                    <Style TargetType="touch:TouchStaticListBoxItem">
                        <Setter Property="BorderBrush" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
                        <Setter Property="BorderThickness" Value="0"></Setter>
                        <Setter Property="CornerRadius" Value="5"></Setter>
                        <Setter Property="Padding" Value="0 10"></Setter>
                        <Setter Property="Margin" Value="25"></Setter>
                        <Setter Property="Background" Value="Transparent"></Setter>
                        <Setter Property="Width" Value="110"></Setter>
                        <Style.Triggers>
                            <Trigger Property="IsSelected" Value="True">
                                <Setter Property="BorderThickness" Value="2"></Setter>
                            </Trigger>
                        </Style.Triggers>
                    </Style>
                </touch:TouchStaticListBox.ItemContainerStyle>
                <touch:TouchStaticListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
                            <Image Stretch="Fill" Width="32" Height="32" RenderOptions.BitmapScalingMode="Fant" Source="../Images/NewJob/twine.png"></Image>
                            <TextBlock HorizontalAlignment="Center" Margin="0 10 0 0" TextAlignment="Center" Text="{Binding Name}" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"></TextBlock>
                        </StackPanel>
                    </DataTemplate>
                </touch:TouchStaticListBox.ItemTemplate>
            </touch:TouchStaticListBox>
            </touch:LightTouchScrollViewer>
        </DockPanel>
    </Grid>
</UserControl>