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
|
<UserControl x:Class="Tango.MachineStudio.Technician.Views.MainView"
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:global="clr-namespace:Tango.MachineStudio.Technician"
xmlns:vm="clr-namespace:Tango.MachineStudio.Technician.ViewModels"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:sharedUI="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:local="clr-namespace:Tango.MachineStudio.Technician.Views"
xmlns:converters="clr-namespace:Tango.MachineStudio.Technician.Converters"
mc:Ignorable="d"
d:DesignHeight="720" d:DesignWidth="1280" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}" Background="White">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/GraphEx.xaml"></ResourceDictionary>
<ResourceDictionary>
<converters:TransitionLinkConverter x:Key="linkConverter"></converters:TransitionLinkConverter>
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Background="#F1F1F1">
<Grid.Resources>
<Style TargetType="Border" x:Key="glowBorder">
<Setter Property="Height" Value="2"></Setter>
<Setter Property="Margin" Value="0 0 0 -15"></Setter>
<Setter Property="HorizontalAlignment" Value="Stretch"></Setter>
<Setter Property="Background" Value="{StaticResource AccentColorBrush3}"></Setter>
<Setter Property="CornerRadius" Value="3"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Button},Path=FontWeight}" Value="Normal">
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation To="0" Duration="00:00:1" Storyboard.TargetProperty="Opacity"></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
<DataTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation To="1" Duration="00:00:0.2" Storyboard.TargetProperty="Opacity"></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</DataTrigger.ExitActions>
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Resources>
<StackPanel Orientation="Horizontal" Margin="10 0 0 0">
<Button Width="110" Style="{StaticResource LinkButton}" FontSize="{StaticResource LargeFontSize}" FontWeight="{Binding ElementName=TransitionControl,Path=SelectedControl,Converter={StaticResource linkConverter}, ConverterParameter='Overview'}" VerticalAlignment="Center" Command="{Binding NavigateToViewCommand}" CommandParameter="Overview">
<StackPanel Orientation="Vertical">
<TextBlock Text="OVERVIEW"></TextBlock>
<Border Style="{StaticResource glowBorder}">
</Border>
</StackPanel>
</Button>
<Button IsEnabled="{Binding IsResultsAvailable}" Width="100" Style="{StaticResource LinkButton}" Margin="20 0 0 0" FontSize="{StaticResource LargeFontSize}" VerticalAlignment="Center" FontWeight="{Binding ElementName=TransitionControl,Path=SelectedControl,Converter={StaticResource linkConverter}, ConverterParameter='Motors'}" Command="{Binding NavigateToViewCommand}" CommandParameter="Motors">
<StackPanel Orientation="Vertical">
<TextBlock Text="MOTORS"></TextBlock>
<Border Style="{StaticResource glowBorder}">
</Border>
</StackPanel>
</Button>
<Grid Visibility="{Binding IsDebugViewEnabled,Converter={StaticResource BooleanToVisibilityConverter}}">
<Button Visibility="{Binding IsDebugViewAttached,Converter={StaticResource BooleanToVisibilityConverter}}" Width="150" Style="{StaticResource LinkButton}" Margin="20 0 0 0" FontSize="{StaticResource LargeFontSize}" VerticalAlignment="Center" FontWeight="{Binding ElementName=TransitionControl,Path=SelectedControl,Converter={StaticResource linkConverter}, ConverterParameter='Sensors'}" Command="{Binding NavigateToViewCommand}" CommandParameter="Sensors">
<StackPanel Orientation="Vertical">
<TextBlock Text="SENSORS"></TextBlock>
<Border Style="{StaticResource glowBorder}" >
</Border>
</StackPanel>
</Button>
</Grid>
</StackPanel>
</Grid>
<sharedUI:MultiTransitionControl Grid.Row="1" x:Name="TransitionControl" x:FieldModifier="public" AlwaysFade="True" TransitionType="Slide" Grid.RowSpan="2">
<sharedUI:MultiTransitionControl.Controls>
<ContentControl Tag="Overview">
<local:OverviewView></local:OverviewView>
</ContentControl>
<ContentControl Tag="Motors">
<local:MotorsView></local:MotorsView>
</ContentControl>
<ContentControl Tag="Sensors">
<local:SensorsView></local:SensorsView>
</ContentControl>
</sharedUI:MultiTransitionControl.Controls>
</sharedUI:MultiTransitionControl>
</Grid>
</UserControl>
|