aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryDisplayView.xaml
blob: 2e1eaf6a13cbc63bd5eed192d077f0348722942d (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
<UserControl x:Class="Tango.MachineStudio.Developer.Views.EmbroideryDisplayView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
               xmlns:emb="clr-namespace:Tango.EmbroideryUI;assembly=Tango.EmbroideryUI"
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:vm="clr-namespace:Tango.MachineStudio.Developer.ViewModels"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:converters="clr-namespace:Tango.MachineStudio.Developer.Converters"
             xmlns:local="clr-namespace:Tango.MachineStudio.Developer.Views"
             mc:Ignorable="d" 
             Width="1280" Height="720" Background="{StaticResource WhiteBackgroundBrush}" d:DataContext="{d:DesignInstance Type=vm:EmbroideryDisplayViewVM, IsDesignTimeCreatable=False}">

    <UserControl.Resources>
        <converters:ByteArrayToBitmapSourceConverter x:Key="ByteArrayToBitmapSourceConverter" />
    </UserControl.Resources>
    
    <Grid>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="60"/>
                <RowDefinition Height="593*"/>
                <RowDefinition Height="60"/>
            </Grid.RowDefinitions>

            <Grid>
                <StackPanel Orientation="Horizontal">
                    <Image Source="../Images/sewing-machine.png" Width="48"></Image>
                    <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="20" Text="{Binding Job.EmbroideryFileName}"></TextBlock>
                </StackPanel>

                <Rectangle VerticalAlignment="Bottom" Stroke="Silver"></Rectangle>
            </Grid>

            <Grid Grid.Row="1">
                <Grid.Background>
                    <ImageBrush ImageSource="../Images/seamless-grid.jpg" Stretch="None" Opacity="0.5" TileMode="Tile" ViewportUnits="Absolute" Viewport="0,0,32,32"></ImageBrush>
                </Grid.Background>
                <Rectangle HorizontalAlignment="Left" Stroke="Silver"></Rectangle>
                <Rectangle HorizontalAlignment="Right" Stroke="Silver"></Rectangle>
                <Image HorizontalAlignment="Center" VerticalAlignment="Center" Source="{Binding Job.EmbroideryJpeg,Converter={StaticResource ByteArrayToBitmapSourceConverter}}"></Image>
            </Grid>

            <Grid Grid.Row="2">
                <Rectangle VerticalAlignment="Top" Stroke="Silver"></Rectangle>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Height="50" Command="{Binding ExportCommand}" Width="180">
                        <StackPanel Orientation="Horizontal">
                            <materialDesign:PackIcon Kind="Export" Width="24" Height="24" />
                            <TextBlock Margin="5 0 0 0" FontSize="16">EXPORT</TextBlock>
                        </StackPanel>
                    </Button>
                </StackPanel>
            </Grid>
        </Grid>
    </Grid>
</UserControl>