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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
|
<UserControl x:Class="Tango.PPC.Jobs.Views.JobView"
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:vm="clr-namespace:Tango.PPC.Jobs.ViewModels"
xmlns:fa="http://schemas.fontawesome.io/icons/"
xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard;assembly=Tango.Touch"
xmlns:global="clr-namespace:Tango.PPC.Jobs"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
xmlns:localConverters="clr-namespace:Tango.PPC.Jobs.Converters"
xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop"
xmlns:localControls="clr-namespace:Tango.PPC.Jobs.Controls"
xmlns:components="clr-namespace:Tango.Touch.Components;assembly=Tango.Touch"
xmlns:local="clr-namespace:Tango.PPC.Jobs.Views"
mc:Ignorable="d"
d:DesignHeight="2000" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:JobViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.JobViewVM}" x:Name="view">
<UserControl.Resources>
<localConverters:ColorSpaceToVisibilityConverter x:Key="ColorSpaceToVisibilityConverter" />
<localConverters:JobToEmbroideryImageConverter x:Key="JobToEmbroideryImageConverter" />
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
<converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter"/>
<converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter"/>
<converters:TimeSpanToMinutesConverter x:Key="TimeSpanToMinutesConverter"/>
<BitmapImage x:Key="Image_Out_Of_Gamut" UriSource="../Images/JobView/error.png" />
<BitmapImage x:Key="Image_Replace_Color" UriSource="../Images/JobView/replace-color.png" />
<BitmapImage x:Key="Image_Color_Picker" UriSource="../Images/JobView/color-picker.png" />
<BitmapImage x:Key="Image_Transparent" UriSource="../Images/JobView/transparent.jpg" />
<BitmapImage x:Key="Image_TransparentSmall" UriSource="../Images/JobView/transparent_small.jpg" />
<Style TargetType="FrameworkElement" x:Key="Level1Container">
<Setter Property="Margin" Value="20 15 60 15"></Setter>
</Style>
<Style TargetType="FrameworkElement" x:Key="Level2Container">
<Setter Property="Margin" Value="80 30 60 0"></Setter>
</Style>
<Style TargetType="FrameworkElement" x:Key="Level2ContainerExtraMargin">
<Setter Property="Margin" Value="80 40 60 0"></Setter>
</Style>
<Style x:Key="CollapsedPanelButton" TargetType="{x:Type touch:TouchButton}">
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}"></Setter>
<Setter Property="MinHeight" Value="50"/>
<Setter Property="CornerRadius" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}"></Setter>
<Setter Property="BorderThickness" Value="0"></Setter>
<Setter Property="EnableDropShadow" Value="False"></Setter>
<Setter Property="Padding" Value="4"></Setter>
<Setter Property="VerticalAlignment" Value="Center"></Setter>
<Setter Property="FontSize" Value="{StaticResource TangoDefaultFontSize}"></Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{StaticResource TangoDisabledBackgroundBrush}"></Setter>
</Trigger>
<DataTrigger Binding="{Binding JobModel.HasSelectedItems}" Value="false">
<Setter Property="Background" Value="{StaticResource TangoDisabledBackgroundBrush}"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="TouchButtonWithDisableState" TargetType="{x:Type touch:TouchButton}">
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
<Setter Property="BorderThickness" Value="0"></Setter>
<Setter Property="EnableDropShadow" Value="False"></Setter>
<Setter Property="FontSize" Value="{StaticResource TangoDefaultFontSize}"></Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{StaticResource TangoDisabledBackgroundBrush}"></Setter>
</Trigger>
</Style.Triggers>
</Style>
<DataTemplate x:Key="HSB_Template" DataType="{x:Type entities:BrushStop}">
<UniformGrid Rows="1" Columns="3">
<StackPanel Orientation="Horizontal">
<TextBlock Text="H" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/>
<Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42" Height="29">
<TextBlock FontSize="{StaticResource TangoSmallFontSize}" Text="{Binding Hue, StringFormat=0.0}" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
</Border>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="10 0 0 0">
<TextBlock Text="S" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/>
<Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42" Height="29">
<TextBlock FontSize="{StaticResource TangoSmallFontSize}" Text="{Binding Saturation, StringFormat=0.0}" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
</Border>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="10 0 0 0">
<TextBlock Text="B" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/>
<Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42" Height="29">
<TextBlock FontSize="{StaticResource TangoSmallFontSize}" Text="{Binding Brightness, StringFormat=0.0}" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
</Border>
</StackPanel>
</UniformGrid>
</DataTemplate>
<DataTemplate x:Key="RGB_Template" DataType="{x:Type entities:BrushStop}">
<UniformGrid Rows="1" Columns="3" Height="30" >
<StackPanel Orientation="Horizontal">
<TextBlock Text="R" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/>
<Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42">
<TextBlock FontSize="{StaticResource TangoSmallFontSize}" Text="{Binding BestMatchColor.R}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
</Border>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="4 0 0 0">
<TextBlock Text="G" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/>
<Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42">
<TextBlock FontSize="{StaticResource TangoSmallFontSize}" Text="{Binding BestMatchColor.G}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
</Border>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="4 0 0 0">
<TextBlock Text="B" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/>
<Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42">
<TextBlock FontSize="{StaticResource TangoSmallFontSize}" Text="{Binding BestMatchColor.B}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
</Border>
</StackPanel>
</UniformGrid>
</DataTemplate>
<DataTemplate x:Key="CMYK_Template" DataType="{x:Type entities:BrushStop}">
<UniformGrid Rows="1" Columns="4" Height="30" >
<StackPanel Orientation="Horizontal">
<TextBlock Text="C" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/>
<Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42">
<TextBlock FontSize="{StaticResource TangoSmallFontSize}" Text="{Binding Cyan, StringFormat=0.0}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
</Border>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0 0 0 0">
<TextBlock Text="M" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/>
<Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42">
<TextBlock FontSize="{StaticResource TangoSmallFontSize}" Text="{Binding Magenta, StringFormat=0.0}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
</Border>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="10 0 0 0">
<TextBlock Text="Y" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/>
<Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42">
<TextBlock FontSize="{StaticResource TangoSmallFontSize}" Text="{Binding Yellow, StringFormat=0.0}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
</Border>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="10 0 0 0">
<TextBlock Text="K" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/>
<Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42">
<TextBlock FontSize="{StaticResource TangoSmallFontSize}" Text="{Binding Black, StringFormat=0.0}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
</Border>
</StackPanel>
</UniformGrid>
</DataTemplate>
<DataTemplate x:Key="LAB_Template" DataType="{x:Type entities:BrushStop}">
<UniformGrid Rows="1" Columns="3" Height="30" MinWidth="150">
<StackPanel Orientation="Horizontal">
<TextBlock Text="L" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/>
<Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42">
<TextBlock FontSize="{StaticResource TangoSmallFontSize}" Text="{Binding BestMatchL, StringFormat=0.0}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
</Border>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="5 0 0 0">
<TextBlock Text="A" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/>
<Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42">
<TextBlock FontSize="{StaticResource TangoSmallFontSize}" Text="{Binding BestMatchA, StringFormat=0.0}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
</Border>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="10 0 0 0">
<TextBlock Text="B" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/>
<Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" Width="42">
<TextBlock FontSize="{StaticResource TangoSmallFontSize}" Text="{Binding BestMatchB, StringFormat=0.0}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
</Border>
</StackPanel>
</UniformGrid>
</DataTemplate>
<DataTemplate x:Key="CATALOG_Template" DataType="{x:Type entities:BrushStop}">
<UniformGrid Rows="1" Columns="2" Height="30" MinWidth="150">
<StackPanel Orientation="Horizontal" Margin="10 0 0 0">
<TextBlock Text="Catalog:" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/>
<Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" MinWidth="42" MaxWidth="130">
<TextBlock Padding="4 0 4 0" FontSize="{StaticResource TangoSmallFontSize}" Text="{Binding ColorCatalog.Name}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
</Border>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="10 0 0 0">
<TextBlock Text="Color:" FontSize="{StaticResource TangoSmallFontSize}" VerticalAlignment="Center"/>
<Border Margin="10 0 0 0" Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" MinWidth="42">
<TextBlock Padding="4 0 4 0" FontSize="{StaticResource TangoSmallFontSize}" Text="{Binding ColorCatalogsItem.Name}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
</Border>
</StackPanel>
</UniformGrid>
</DataTemplate>
<DataTemplate x:Key="Segment_Template" DataType="{x:Type entities:Segment}">
<Grid Height="380" Margin="57 15 57 0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<DockPanel>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right" Height="60">
<touch:TouchButton Margin="20 0 0 0" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding ElementName=view,Path=DataContext.RemoveSegmentCommand}" CommandParameter="{Binding}">
<Border Height="24" Width="24" BorderThickness="0" BorderBrush="{StaticResource TangoKeyboardKeyDarkBrush}" Background="Transparent" HorizontalAlignment="Left">
<Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/delete_segment.png"/>
</Border>
</touch:TouchButton>
<touch:TouchButton Margin="20 0 0 0" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding ElementName=view,Path=DataContext.DuplicateSegmentCommand}" CommandParameter="{Binding}">
<Border Height="24" Width="24" BorderThickness="0" BorderBrush="{StaticResource TangoKeyboardKeyDarkBrush}" Background="Transparent" HorizontalAlignment="Left">
<Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/duplicate.png"/>
</Border>
</touch:TouchButton>
</StackPanel>
<StackPanel Grid.Row="0" DockPanel.Dock="Left">
<StackPanel Margin="0 0 0 0" Orientation="Horizontal" >
<controls:FastTextBlock FontSize="{StaticResource TangoTitleFontSize}">Segment #</controls:FastTextBlock>
<controls:FastTextBlock FontSize="{StaticResource TangoTitleFontSize}" Text="{Binding SegmentIndex,Mode=OneWay}"></controls:FastTextBlock>
</StackPanel>
<StackPanel Margin="0 0 0 0" Orientation="Horizontal">
<controls:FastTextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left" Text="Length (m):" FontSize="18"></controls:FastTextBlock>
<touch:TouchNumericTextBox Margin="20 0 0 0" Width="92" DockPanel.Dock="Right" Value="{Binding Length, UpdateSourceTrigger=LostFocus}" StringFormat="0.0" AutoCalculateJogStep="False" HasDecimalPoint="True" Minimum="1" Maximum="100000" KeyboardContainer="{Binding ElementName=Container}" FontSize="18" ValueChangedEnd="Length_ValueChanged" TextGotFocus="Length_BeforeChangeValue"/>
</StackPanel>
</StackPanel>
</DockPanel>
<Border Grid.Row="1" x:Name="segmentBrush" Height="90" Margin="0 20 0 0" CornerRadius="20" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="1" BorderBrush="{StaticResource TangoGrayBrush}">
<Border Background="{Binding SegmentBrush}" CornerRadius="20">
<DockPanel>
<touch:TouchButton Margin="0 0 20 0" VerticalAlignment="Center" DockPanel.Dock="Right" Command="{Binding ElementName=view,Path=DataContext.EditColorCommand}" CommandParameter="{Binding SecondBrushStop}" Visibility="{Binding IsGradient, Converter={StaticResource BooleanToVisibilityConverter}}" EnableDropShadow="False" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" Background="Transparent" BorderThickness="0">
<Border Height="40" Width="40" BorderThickness="0" BorderBrush="{StaticResource TangoKeyboardKeyDarkBrush}" Background="Transparent" HorizontalAlignment="Left">
<Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/Edit_color.png"/>
</Border>
</touch:TouchButton>
<touch:TouchButton Margin="20 0 0 0" VerticalAlignment="Center" DockPanel.Dock="Left" Command="{Binding ElementName=view,Path=DataContext.EditColorCommand}" CommandParameter="{Binding FirstBrushStop}" Visibility="{Binding HasColors, Converter={StaticResource BooleanToVisibilityConverter}}" EnableDropShadow="False" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" Background="Transparent" BorderThickness="0">
<Border Height="40" Width="40" BorderThickness="0" BorderBrush="{StaticResource TangoKeyboardKeyDarkBrush}" Background="Transparent" HorizontalAlignment="Left">
<Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/Edit_color.png"/>
</Border>
</touch:TouchButton>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
<!--<touch:TouchIconButton Command="{Binding ElementName=view,Path=DataContext.AddColorCommand}" CommandParameter="{Binding}"
Height="40" Width="40" Style="{StaticResource TangoRoundTouchIconButton}" Icon="Plus" Background="{StaticResource TangoRippleDarkBrush}" Foreground="{StaticResource TangoLightForegroundBrush}" Padding="12" Margin="20 0 0 0" />-->
<touch:TouchButton Margin="20 0 0 0" VerticalAlignment="Center" DockPanel.Dock="Left" Command="{Binding ElementName=view,Path=DataContext.AddColorCommand}" CommandParameter="{Binding}" EnableDropShadow="False" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" Background="Transparent" BorderThickness="0">
<Border Height="40" Width="40" BorderThickness="0" BorderBrush="{StaticResource TangoKeyboardKeyDarkBrush}" Background="Transparent" HorizontalAlignment="Left">
<Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/AddColor.png"/>
</Border>
</touch:TouchButton>
<TextBlock VerticalAlignment="Center" Margin="20 5 0 0" FontSize="{StaticResource TangoSmallFontSize}" Visibility="{Binding HasColors, Converter={StaticResource BooleanToVisibilityInverseConverter}}" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}">Add Color</TextBlock>
</StackPanel>
</DockPanel>
</Border>
</Border>
<!--<Canvas Grid.Row="1" x:Name="alert_canvas_segment" Width="30" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="-40 -10 0 0" >
<touch:TouchButton Height="22" Width="24" Canvas.Left="0" Canvas.Top="0" x:Name="addmyColors" EnableDropShadow="False" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" Background="Transparent" BorderThickness="0" Visibility="{Binding HasOutOfGamutBrush, Converter={StaticResource BooleanToVisibilityConverter}}">
<Border BorderThickness="0" BorderBrush="{StaticResource TangoKeyboardKeyDarkBrush}" Background="Transparent" HorizontalAlignment="Left">
<Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/Exclamation_black.png"/>
</Border>
</touch:TouchButton>
</Canvas>-->
<Grid Grid.Row="2" x:Name="sliderThreeThumbs" Visibility="{Binding IsGradient, Converter={StaticResource BooleanToVisibilityConverter}}" >
<touch:TouchSliderThreeThumbs Height="40" MinimumMiddleRange="5.0" Length="{Binding Length}" LowerValue="{Binding LeftOffset, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" MiddleValue="{Binding MiddleOffset, Mode=TwoWay}" UpperValue="{Binding RightOffset, Mode=TwoWay}"
LowerValueEndChanging ="{Binding LeftOffsetChangeComleted}" LowerValueStartChanging="{Binding LeftOffsetStartChanging}"
UpperValueStartChanging ="{Binding RightOffsetStartChanging}" UpperValueEndChanging="{Binding RightOffsetChangeComleted}"
MiddleValueStartChanging ="{Binding MiddleOffsetStartChanging}" MiddleValueEndChanging ="{Binding MiddleOffsetChangeComleted}"/>
</Grid>
<Grid Grid.Row="3" Margin="0 10 0 0" x:Name="colorSpacesSegment" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*" MinWidth="10"/>
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ContentControl x:Name="leftColorSpaceValues" Grid.Column="0" Focusable="False" Margin="0 0 0 0" HorizontalAlignment="Left" Content="{Binding FirstBrushStop}" Visibility="{Binding HasColors, Converter={StaticResource BooleanToVisibilityConverter}}">
<ContentControl.Style>
<Style TargetType="ContentControl">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate/>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding FirstBrushStop.ColorSpace, Converter={StaticResource EnumToDescriptionConverter}}" Value="HSB">
<Setter Property="ContentTemplate" Value="{StaticResource HSB_Template}" />
</DataTrigger>
<DataTrigger Binding="{Binding FirstBrushStop.ColorSpace, Converter={StaticResource EnumToDescriptionConverter}}" Value="RGB">
<Setter Property="ContentTemplate" Value="{StaticResource RGB_Template}" />
</DataTrigger>
<DataTrigger Binding="{Binding FirstBrushStop.ColorSpace, Converter={StaticResource EnumToDescriptionConverter}}" Value="Volume">
<Setter Property="ContentTemplate" Value="{StaticResource CMYK_Template}" />
</DataTrigger>
<DataTrigger Binding="{Binding FirstBrushStop.ColorSpace, Converter={StaticResource EnumToDescriptionConverter}}" Value="LAB">
<Setter Property="ContentTemplate" Value="{StaticResource LAB_Template}" />
</DataTrigger>
<DataTrigger Binding="{Binding FirstBrushStop.ColorSpace, Converter={StaticResource EnumToDescriptionConverter}}" Value="Catalog">
<Setter Property="ContentTemplate" Value="{StaticResource CATALOG_Template}" />
</DataTrigger>
</Style.Triggers>
</Style>
</ContentControl.Style>
</ContentControl>
<Border Grid.Column="1"></Border>
<ContentControl x:Name="rightColorSpaceValues" Grid.Column="2" Focusable="False" Margin="0 0 0 0"
HorizontalAlignment="Right"
Visibility="{Binding IsGradient, Converter={StaticResource BooleanToVisibilityConverter}}" Content="{Binding SecondBrushStop}">
<ContentControl.Style>
<Style TargetType="ContentControl">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate/>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding SecondBrushStop.ColorSpace, Converter={StaticResource EnumToDescriptionConverter}, Mode=OneWay}" Value="HSB">
<Setter Property="ContentTemplate" Value="{StaticResource HSB_Template}" />
</DataTrigger>
<DataTrigger Binding="{Binding SecondBrushStop.ColorSpace, Converter={StaticResource EnumToDescriptionConverter}, Mode=TwoWay}" Value="RGB">
<Setter Property="ContentTemplate" Value="{StaticResource RGB_Template}" />
</DataTrigger>
<DataTrigger Binding="{Binding SecondBrushStop.ColorSpace, Converter={StaticResource EnumToDescriptionConverter}, Mode=OneWay}" Value="Volume">
<Setter Property="ContentTemplate" Value="{StaticResource CMYK_Template}" />
</DataTrigger>
<DataTrigger Binding="{Binding SecondBrushStop.ColorSpace, Converter={StaticResource EnumToDescriptionConverter}, Mode=OneWay}" Value="LAB">
<Setter Property="ContentTemplate" Value="{StaticResource LAB_Template}" />
</DataTrigger>
<DataTrigger Binding="{Binding SecondBrushStop.ColorSpace, Converter={StaticResource EnumToDescriptionConverter}, Mode=OneWay}" Value="Catalog">
<Setter Property="ContentTemplate" Value="{StaticResource CATALOG_Template}" />
</DataTrigger>
</Style.Triggers>
</Style>
</ContentControl.Style>
</ContentControl>
</Grid>
<Grid Grid.Row="4" x:Name="add_new_segment_gap" HorizontalAlignment="Stretch" Margin="0 30 0 0" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Rectangle Stroke="{StaticResource TangoDividerBrush}" StrokeThickness="1" VerticalAlignment="Top" />
<Border x:Name="gapBorder" Margin="0 0 0 0" Height="24" ClipToBounds="False" CornerRadius="10" Visibility="{Binding EnableInterSegment, Converter={StaticResource BooleanToVisibilityConverter}}">
<Border.Clip>
<RectangleGeometry RadiusX="10" RadiusY="10">
<RectangleGeometry.Rect>
<MultiBinding Converter="{StaticResource WidthHeightToRectConverter}">
<Binding ElementName="gapBorder" Path="ActualWidth" />
<Binding ElementName="gapBorder" Path="ActualHeight" />
</MultiBinding>
</RectangleGeometry.Rect>
</RectangleGeometry>
</Border.Clip>
<Grid>
<TextBlock FontSize="{StaticResource TangoDefaultFontSize}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4">
<Run Text="{Binding InterSegmentLength, Mode=OneWay}"></Run>
<Run Text="m Gap"></Run>
</TextBlock>
<Rectangle Stroke="{StaticResource TangoGrayBrush}" StrokeThickness="1" StrokeDashArray="5 5 5 5" RadiusX="12" RadiusY="12" />
</Grid>
</Border>
<DockPanel Margin="0 20 0 0" Grid.Row="1">
<!--<Grid DockPanel.Dock="Right" Visibility="{Binding IsLast, Converter={StaticResource BooleanToVisibilityInverseConverter}}">-->
<Grid DockPanel.Dock="Right" Visibility="Collapsed">
<touch:TouchButton x:Name="deletegap" DockPanel.Dock="Right" HorizontalAlignment="Right" VerticalAlignment="Center" Command="{Binding DeleteGapCommand}" EnableDropShadow="False" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" Background="Transparent" BorderThickness="0" Visibility="{Binding EnableInterSegment, Converter={StaticResource BooleanToVisibilityConverter}}">
<TextBlock Margin="10 2 0 0" FontSize="{StaticResource TangoButtonFontSize}" VerticalAlignment="Center">Delete Gap</TextBlock>
</touch:TouchButton>
<touch:TouchButton x:Name="addGap" DockPanel.Dock="Right" HorizontalAlignment="Left" VerticalAlignment="Center" Command="{Binding AddGapCommand}" EnableDropShadow="False" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" Background="Transparent" BorderThickness="0" Visibility="{Binding EnableInterSegment, Converter={StaticResource BooleanToVisibilityInverseConverter}}">
<StackPanel Orientation="Horizontal">
<Border Height="35" Width="35" BorderThickness="0" Background="Transparent" HorizontalAlignment="Left">
<Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/add_gap.png"/>
</Border>
<TextBlock Margin="10 2 0 0" FontSize="{StaticResource TangoButtonFontSize}" VerticalAlignment="Center">Add Gap</TextBlock>
</StackPanel>
</touch:TouchButton>
</Grid>
<touch:TouchButton DockPanel.Dock="Left" HorizontalAlignment="Left" VerticalAlignment="Center" Command="{Binding DataContext.AddNewSegmentCommand, ElementName=listSegments}" CommandParameter="{Binding SegmentIndex}" EnableDropShadow="False" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" Background="Transparent" BorderThickness="0">
<StackPanel Orientation="Horizontal">
<Border Height="35" Width="35" BorderThickness="0" Background="Transparent" HorizontalAlignment="Left">
<Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/AddNewSegment.png"/>
</Border>
<TextBlock Margin="10 2 0 0" FontSize="{StaticResource TangoButtonFontSize}" VerticalAlignment="Center">Add New Segments</TextBlock>
</StackPanel>
</touch:TouchButton>
</DockPanel>
<Rectangle Margin="0 10 0 0" Grid.Row="2" Stroke="{StaticResource TangoDividerBrush}" StrokeThickness="1" VerticalAlignment="Bottom"/>
</Grid>
</Grid>
</DataTemplate>
<DataTemplate x:Key="CollapsedSegment_Template" DataType="{x:Type entities:Segment}">
<Grid Height="180" Margin="57 15 57 0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<DockPanel>
<Rectangle DockPanel.Dock="Top" Stroke="{StaticResource TangoDividerBrush}" StrokeThickness="1" VerticalAlignment="Top" Margin="0 0 0 10"/>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right" Height="40">
<touch:TouchButton Margin="0 0 0 0" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding ElementName=view,Path=DataContext.RemoveSegmentCommand}" CommandParameter="{Binding}">
<Border Height="24" Width="24" BorderThickness="0" BorderBrush="{StaticResource TangoKeyboardKeyDarkBrush}" Background="Transparent" HorizontalAlignment="Left">
<Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/delete_segment.png"/>
</Border>
</touch:TouchButton>
<touch:TouchButton Margin="20 0 0 0" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding ElementName=view,Path=DataContext.DuplicateSegmentCommand}" CommandParameter="{Binding}">
<Border Height="24" Width="24" BorderThickness="0" BorderBrush="{StaticResource TangoKeyboardKeyDarkBrush}" Background="Transparent" HorizontalAlignment="Left">
<Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/duplicate.png"/>
</Border>
</touch:TouchButton>
</StackPanel>
<StackPanel DockPanel.Dock="Left">
<StackPanel Margin="0 10 0 0" Orientation="Horizontal" >
<controls:FastTextBlock FontSize="{StaticResource TangoTitleFontSize}">Segment #</controls:FastTextBlock>
<controls:FastTextBlock FontSize="{StaticResource TangoTitleFontSize}" Text="{Binding SegmentIndex,Mode=OneWay}"></controls:FastTextBlock>
</StackPanel>
</StackPanel>
</DockPanel>
<StackPanel Grid.Row="1" Orientation="Vertical">
<Border Height="50" x:Name="segmentBrush" Margin="0 10 0 0" CornerRadius="25" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="1" BorderBrush="{StaticResource TangoGrayBrush}">
<Border Background="{Binding SegmentBrush}" CornerRadius="25" />
</Border>
<Border x:Name="gapBorder" Margin="0 20 0 0" Height="24" ClipToBounds="False" CornerRadius="10" Visibility="{Binding EnableInterSegment, Converter={StaticResource BooleanToVisibilityConverter}}">
<Border.Clip>
<RectangleGeometry RadiusX="10" RadiusY="10">
<RectangleGeometry.Rect>
<MultiBinding Converter="{StaticResource WidthHeightToRectConverter}">
<Binding ElementName="gapBorder" Path="ActualWidth" />
<Binding ElementName="gapBorder" Path="ActualHeight" />
</MultiBinding>
</RectangleGeometry.Rect>
</RectangleGeometry>
</Border.Clip>
<Grid>
<TextBlock FontSize="{StaticResource TangoDefaultFontSize}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4">
<Run Text="5m"></Run>
<Run Text=" Gap"></Run>
</TextBlock>
<Rectangle Stroke="{StaticResource TangoGrayBrush}" StrokeThickness="1" StrokeDashArray="5 5 5 5" RadiusX="12" RadiusY="12" />
</Grid>
</Border>
</StackPanel>
<Canvas Grid.Row="1" x:Name="select_canvas_segment" Width="24" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="-50 -35 0 0" >
<touch:TouchCheckBox Height="22" Width="24" Margin="20 -20 0 0" Style="{StaticResource TouchRoundCheckBox}" Canvas.Left="0" Canvas.Top="0" x:Name="selectItem" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" Background="Transparent" IsChecked="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Canvas>
</Grid>
</DataTemplate>
</UserControl.Resources>
<Grid Background="{StaticResource TangoMidBackgroundBrush}" SnapsToDevicePixels="False">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" x:Name="jobDetailsBorder" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoLightBorderBrush}" Margin="0 0 0 0">
<Grid x:Name="job_details" HorizontalAlignment="Stretch" >
<DockPanel Height="72" HorizontalAlignment="Stretch">
<touch:TouchButton Margin="0 0 30 0" DockPanel.Dock="Right" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding EditJobDetailsCommand}" >
<Border Height="20" Width="20" BorderThickness="0" Background="Transparent" HorizontalAlignment="Right">
<Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/job_details.png"/>
</Border>
</touch:TouchButton>
<Grid DockPanel.Dock="Left" VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="0 0 30 0" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Margin="10 0 0 0" VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Left">
<StackPanel.ToolTip>
<ToolTip>
<TextBlock Text="{Binding JobModel.Name}" />
</ToolTip>
</StackPanel.ToolTip>
<TextBlock TextTrimming="CharacterEllipsis" VerticalAlignment="Center" FontWeight="Medium" FontSize="{StaticResource TangoMenuItemFontSize}" Text="{Binding JobModel.Name,FallbackValue='Job Name'}" MaxWidth="300"/>
</StackPanel>
<StackPanel Margin="10 0 0 0" Grid.Column="1" VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Left">
<StackPanel.ToolTip>
<ToolTip>
<TextBlock Text="{Binding JobModel.Rml.Name}" />
</ToolTip>
</StackPanel.ToolTip>
<TextBlock Text="Thread Type:" VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}" ></TextBlock>
<TextBlock Margin="10 0 0 0" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" FontWeight="Medium" Text="{Binding JobModel.Rml.Name}"/>
</StackPanel>
<StackPanel Margin="10 0 0 0" Grid.Column="2" VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Center">
<StackPanel.ToolTip>
<ToolTip>
<TextBlock Text="{Binding JobModel.SpoolType.Name}" />
</ToolTip>
</StackPanel.ToolTip>
<TextBlock Text="Spool Type:" VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}" ></TextBlock>
<TextBlock Text="{Binding JobModel.SpoolType.Name}" Margin="10 0 0 0" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" FontWeight="Medium"/>
</StackPanel>
</Grid>
</DockPanel>
</Grid>
</Border>
<touch:TouchLoadingPanel Grid.Row="1" IsLoading="{Binding IsBusy}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid>
<Grid >
<DockPanel VerticalAlignment="Top" x:Name="collapsedToolbar" Margin="0 2 20 0" HorizontalAlignment="Stretch" Height="66">
<Border DockPanel.Dock="Right" Width="613" Height="62" CornerRadius="31" BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="1" Background="{StaticResource TangoPrimaryBackgroundBrush}" Visibility="{Binding IsFullMode, Converter={StaticResource BooleanToVisibilityInverseConverter}}">
<Border.Effect>
<DropShadowEffect Opacity="0.5" ShadowDepth="6" Color="Silver" BlurRadius="10" Direction="270"/>
</Border.Effect>
<UniformGrid Columns="6" Rows="1" DockPanel.Dock="Left" HorizontalAlignment="Stretch" >
<touch:TouchButton Style="{StaticResource CollapsedPanelButton}" EnableDropShadow="False" Command="{Binding RepeateSegmentCommand}" IsEnabled="False">
<StackPanel Orientation="Vertical" VerticalAlignment="Center" >
<Image Width="20" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/repeat.png"/>
<TextBlock FontWeight="Medium" Margin="0 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoSmallFontSizeBar}" Foreground="{StaticResource TangoMidAccentBrush}">Repeat</TextBlock>
</StackPanel>
</touch:TouchButton>
<touch:TouchButton Style="{StaticResource CollapsedPanelButton}" EnableDropShadow="False" Command="{Binding ReverseCommand}" IsEnabled="{Binding JobModel.HasSelectedItems, Converter={StaticResource BooleanToVisibilityConverter}}">
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
<Image Width="20" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/reverse.png"/>
<TextBlock FontWeight="Medium" Margin="0 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoSmallFontSizeBar}" Foreground="{StaticResource TangoMidAccentBrush}">Reverse</TextBlock>
</StackPanel>
</touch:TouchButton>
<touch:TouchButton Style="{StaticResource CollapsedPanelButton}" EnableDropShadow="False" Command="{Binding DeleteSegmentCommand}" IsEnabled="{Binding JobModel.HasSelectedItems, Converter={StaticResource BooleanToVisibilityConverter}}">
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
<Image Width="20" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/delete_segment.png"/>
<TextBlock FontWeight="Medium" Margin="0" VerticalAlignment="Center" FontSize="{StaticResource TangoSmallFontSizeBar}" Foreground="{StaticResource TangoMidAccentBrush}">Delete</TextBlock>
</StackPanel>
</touch:TouchButton>
<touch:TouchButton Style="{StaticResource CollapsedPanelButton}" EnableDropShadow="False" Command="{Binding PasteCommand}" IsEnabled="{Binding JobModel.HasSelectedItems, Converter={StaticResource BooleanToVisibilityConverter}}" >
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
<Image Width="20" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/paste.png"/>
<TextBlock FontWeight="Medium" Margin="0" VerticalAlignment="Center" FontSize="{StaticResource TangoSmallFontSizeBar}" Foreground="{StaticResource TangoMidAccentBrush}">Paste</TextBlock>
</StackPanel>
</touch:TouchButton>
<touch:TouchButton Style="{StaticResource CollapsedPanelButton}" EnableDropShadow="False" Command="{Binding CopyCommand}" IsEnabled="{Binding JobModel.HasSelectedItems, Converter={StaticResource BooleanToVisibilityConverter}}">
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
<Image Width="20" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/duplicate.png"/>
<TextBlock FontWeight="Medium" Margin="0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoSmallFontSizeBar}" Foreground="{StaticResource TangoMidAccentBrush}">Copy</TextBlock>
</StackPanel>
</touch:TouchButton>
</UniformGrid>
</Border>
<Grid DockPanel.Dock="Left" HorizontalAlignment="Left" Margin="40 0 30 0">
<StackPanel DockPanel.Dock="Left" HorizontalAlignment="Left" Orientation="Horizontal" VerticalAlignment="Center">
<touch:TouchButton Margin="0" Style="{StaticResource TouchButtonWithDisableState}" VerticalAlignment="Center" HorizontalAlignment="Left" EnableDropShadow="False" Command="{Binding UndoCommand}" ToolTip="Undone" >
<Border Padding="0" BorderThickness="0" Background="Transparent" HorizontalAlignment="Left">
<Image Height="28" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/undo.png"/>
</Border>
</touch:TouchButton>
<touch:TouchButton Margin="16 0 0 0" Style="{StaticResource TouchButtonWithDisableState}" VerticalAlignment="Center" HorizontalAlignment="Left" EnableDropShadow="False" Command="{Binding RedoCommand}" ToolTip="Restore">
<Border Padding="0" BorderThickness="0" Background="Transparent" HorizontalAlignment="Left">
<Image Height="28" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/redo.png"/>
</Border>
</touch:TouchButton>
</StackPanel>
</Grid>
</DockPanel>
<Canvas Width="70" Height="70" Margin="0 3 40 0" HorizontalAlignment="Right" VerticalAlignment="Center">
<touch:TouchButton HorizontalAlignment="Right" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding JobModeSwitchCommand}" >
<Border BorderThickness="0" Background="Transparent" HorizontalAlignment="Right">
<Image Height="70" Width="70" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/job_mode.png"/>
</Border>
</touch:TouchButton>
</Canvas>
</Grid>
</Grid>
<Grid Grid.Row="1" x:Name="segmentsGrid" Grid.RowSpan="3" >
<Grid x:Name="Container" keyboard:KeyboardView.ContainerOffset="40" Margin="10 0 10 0" Background="{StaticResource TangoPrimaryBackgroundBrush}">
<touch:TouchDropShadowBorder Margin="0 0 0 0" Padding="0 0 0 40" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<DockPanel>
<StackPanel x:Name="colorAndLength" DockPanel.Dock="Top" Orientation="Horizontal" VerticalAlignment="Top">
<StackPanel.Style>
<Style TargetType="StackPanel">
<Setter Property="Margin" Value="20 15 10 15"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsFullMode}" Value="false">
<Setter Property="Margin" Value="20 15 60 15"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</StackPanel.Style>
<Image Source="../Images/JobView/color-length.png" Width="39" />
<TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Color & Length</TextBlock>
</StackPanel>
<touch:TouchCheckBox x:Name="selectAll" Width="120" Height="22" Style="{StaticResource TouchRoundCheckBox}" Margin="28 0 0 20" IsChecked="{Binding JobModel.SelectAllSegments}" DockPanel.Dock="Top" FontSize="{StaticResource TangoDefaultFontSize}" HorizontalAlignment="Left" Visibility="{Binding IsFullMode, Converter={StaticResource BooleanToVisibilityInverseConverter}}">
<TextBlock FontSize="{StaticResource TangoButtonFontSize}" Foreground="{StaticResource TangoMidAccentBrush}"> Select All</TextBlock>
</touch:TouchCheckBox>
</DockPanel>
</Grid>
<Grid Grid.Row="1" Margin="0 10 0 0">
<!--Border x:Name="borderDockFloat" Height="10" Margin="0 0 0 0" BorderBrush="Transparent" >
<DockPanel x:Name="dockEdit" LastChildFill="False" Height="10" Width="50" HorizontalAlignment="Right" RenderTransformOrigin="0.58,2.08"/>
</Border> -->
<ListBox x:Name="listSegments" Margin="10 0 10 60" ItemsSource="{Binding SegmentsCollectionView}" ItemTemplate="{StaticResource Segment_Template}" Style="{StaticResource SegmentsListBox}"
ScrollViewer.VerticalScrollBarVisibility="Visible"
Visibility="{Binding IsFullMode, Converter={StaticResource BooleanToVisibilityConverter}}" />
<ListBox x:Name="collapsedListSegments" ItemsSource="{Binding SegmentsCollectionView}" ItemTemplate="{StaticResource CollapsedSegment_Template}" Style="{StaticResource SegmentsListBox}"
ScrollViewer.VerticalScrollBarVisibility="Visible"
Visibility="{Binding IsFullMode, Converter={StaticResource BooleanToVisibilityInverseConverter}}" Margin=" 0 0 0 40"/>
<!--<StackPanel x:Name="stackOutput" Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}"/>-->
</Grid>
</Grid>
</touch:TouchDropShadowBorder>
</Grid>
<Border VerticalAlignment="Top" x:Name="borderEditDock" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 0" BorderBrush="{StaticResource TangoDividerBrush}" Padding="0 0 0 10" Margin="10 0 10 0"/>
</Grid>
<Grid Grid.Row="2">
<!--<Grid IsHitTestVisible="False">
<Grid.Background>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#AEFFFFFF" />
<GradientStop Offset="1" Color="{StaticResource TangoPrimaryBackgroundColor}" />
</LinearGradientBrush>
</Grid.Background>
<Rectangle Stroke="{StaticResource TangoDividerBrush}" StrokeThickness="1" VerticalAlignment="Top" />
</Grid>-->
</Grid>
<!--<touch:TouchDropShadowBorder Grid.Row="3" Margin="10 0 10 15" CornerRadius="0" BorderThickness="0" Padding="0" >-->
<Border Grid.Row="3" Margin="10 0 10 15" BorderThickness="0">
<touch:TouchExpander x:Name="summaryExpander" IsExpanded="{Binding IsSummaryOpened, Mode=TwoWay}" Grid.Row="3" Margin="15 0 15 0 " FontSize="{StaticResource TangoTitleFontSize}" BorderThickness="0" Style="{StaticResource TouchRoundedExpander}">
<touch:TouchExpander.Header>
<DockPanel >
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right" Margin="0 0 20 0" Visibility="{Binding IsSummaryOpened, Converter={StaticResource BooleanToVisibilityConverter}, Mode=TwoWay}">
<touch:TouchButton HorizontalAlignment="Right" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding RepeatUnitsCommand}" >
<Border CornerRadius="20" Width="130" Height="40" BorderThickness="1" BorderBrush="{StaticResource TangoDarkForegroundBrush}">
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}" Foreground="{StaticResource TangoDarkForegroundBrush}">Repeat All</TextBlock>
</Border>
</touch:TouchButton>
<TextBlock Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}" FontWeight="SemiBold" Foreground="{StaticResource TangoPrimaryAccentBrush}">
<Run Text="x"></Run>
<Run Text="{Binding JobModel.NumberOfUnits,Mode=OneWay}"/>
</TextBlock>
</StackPanel>
<StackPanel DockPanel.Dock="Left" Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
<Image Source="../Images/JobView/job-summary.png" Width="39" />
<TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Job Summary</TextBlock>
</StackPanel>
</DockPanel>
</touch:TouchExpander.Header>
<StackPanel Margin="40 0 40 0">
<TextBlock VerticalAlignment="Top" DockPanel.Dock="Top" Foreground="{StaticResource TangoDarkForegroundBrush}">
<Run Text="Unit: "></Run>
<Run Text="{Binding JobModel.Length,Mode=OneWay}"/>
<Run Text="m"></Run>
</TextBlock>
<Grid Margin=" 0 10 0 0">
<!--<touch:TouchVirtualizedContentReplaceControl MinHeight="40">
<DataTemplate>-->
<localControls:JobSummeryViewer JobModel="{Binding JobModel}" Height="20" DisplayMarkers="False" />
<!--</DataTemplate>
</touch:TouchVirtualizedContentReplaceControl>-->
</Grid>
<DockPanel Margin="0 20 0 0" LastChildFill="False">
<StackPanel Orientation="Horizontal" DockPanel.Dock="Left" VerticalAlignment="Center">
<TextBlock>
<Run Text="Total:"></Run>
<Run Text="{Binding JobModel.LengthIncludingNumberOfUnits,Mode=OneWay}"></Run>
<Run Text="m"></Run>
</TextBlock>
<TextBlock Foreground="{StaticResource TangoGrayTextBrush}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Visibility" Value="Collapsed"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding JobModel.LengthPercentageFactor,Converter={StaticResource GreaterThanToBooleanConverter},ConverterParameter=0}" Value="True">
<Setter Property="Visibility" Value="Visible"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
<Run>(</Run><Run Text="{Binding JobModel.Length,Mode=OneWay}"></Run><Run>+</Run><Run Text="{Binding JobModel.LengthPercentageFactor,Mode=OneWay}"></Run><Run>%</Run><Run>)</Run>
</TextBlock>
</StackPanel>
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 -20 5 0">
<TextBlock Margin="0 3 0 0" VerticalAlignment="Bottom">
<!--<Run Text="Factor: +"></Run>-->
<Run Text="Duration: "></Run>
<Run Text="{Binding JobModel.GetEstimatedDuration, Converter={StaticResource TimeSpanToMinutesConverter},FallbackValue=0, Mode=OneWay,StringFormat=0.0}"></Run>
<Run Text="min"></Run>
</TextBlock>
<!--<touch:TouchNumericTextBox Foreground="{StaticResource TangoGrayTextBrush}" Margin="5 0 0 0" Width="50" HorizontalContentAlignment="Center" Maximum="100" Minimum="0" Value="{Binding JobModel.LengthPercentageFactor}" KeyboardContainer="{Binding ElementName=Container}" StringFormat="0" FocusSelectionMode="SelectAll" />
<TextBlock VerticalAlignment="Bottom" Foreground="{StaticResource TangoGrayTextBrush}">%</TextBlock>-->
</StackPanel>
</DockPanel>
</StackPanel>
</touch:TouchExpander>
</Border>
<!--</touch:TouchDropShadowBorder>-->
<!--<dragAndDrop:DraggingSurface x:Name="DraggingSurface" />-->
</Grid>
</touch:TouchLoadingPanel>
</Grid>
</UserControl>
|