blob: d26d94c61ef7d03d96377934553e5f029ae973b9 (
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
95
96
97
98
99
100
101
102
103
104
105
106
|
<UserControl x:Class="Tango.PanelPC.UI.Views.LayoutView"
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.PanelPC.UI.Views"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:vm="clr-namespace:Tango.PanelPC.UI.ViewModels"
xmlns:global="clr-namespace:Tango.PanelPC.UI"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
mc:Ignorable="d"
d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:LayoutViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LayoutViewVM}">
<Grid>
<materialDesign:DrawerHost IsLeftDrawerOpen="{Binding Source={x:Reference MenuToggleButton}, Path=IsChecked}">
<materialDesign:DrawerHost.LeftDrawerContent>
<DockPanel LastChildFill="False">
<StackPanel MinWidth="300" DockPanel.Dock="Top">
<Grid>
<ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}"
HorizontalAlignment="Right" Margin="16"
IsChecked="{Binding Source={x:Reference MenuToggleButton}, Path=IsChecked, Mode=TwoWay}" />
<StackPanel Margin="5 0 0 0" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
<Image Source="/Images/account.png" RenderOptions.BitmapScalingMode="Fant" VerticalAlignment="Center" Width="50" Height="50"></Image>
<StackPanel Margin="0 5 0 0">
<TextBlock FontSize="16" TextTrimming="CharacterEllipsis" MaxWidth="170" FontStyle="Italic" FontWeight="Bold" Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding AuthenticationProvider.CurrentUser.Contact.FullName}"></TextBlock>
<TextBlock FontSize="12" TextTrimming="CharacterEllipsis" MaxWidth="170" FontStyle="Italic" Margin="10 5 0 0" VerticalAlignment="Center">
<Run Text="{Binding AuthenticationProvider.CurrentUser.Organization.Name}"></Run>
,
<Run Text="{Binding AuthenticationProvider.CurrentUser.Roles[0].Name}">
<Run.ToolTip>
<ItemsControl ItemsSource="{Binding AuthenticationProvider.CurrentUser.Roles}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="2">
<materialDesign:PackIcon Kind="AccountKey" Width="16" Height="16" />
<TextBlock Margin="5 0 0 0" Text="{Binding Name}"></TextBlock>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Run.ToolTip>
</Run>
<Run>...</Run>
</TextBlock>
</StackPanel>
</StackPanel>
</Grid>
<StackPanel Margin="0 16 0 0">
<ListBoxItem>
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseUp">
<i:InvokeCommandAction Command="{Binding HomeCommand}"></i:InvokeCommandAction>
</i:EventTrigger>
</i:Interaction.Triggers>
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon VerticalAlignment="Center" Kind="Home" Width="32" Height="32"></materialDesign:PackIcon>
<TextBlock FontSize="16" VerticalAlignment="Center" Margin="10 0 0 0">Home</TextBlock>
</StackPanel>
</ListBoxItem>
</StackPanel>
</StackPanel>
<StackPanel DockPanel.Dock="Bottom">
<Separator Margin="0 10 0 0" Background="Gainsboro" />
<ListBoxItem>
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseUp">
<i:InvokeCommandAction Command="{Binding SignoutCommand}"></i:InvokeCommandAction>
</i:EventTrigger>
</i:Interaction.Triggers>
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon VerticalAlignment="Center" Kind="Logout" Width="32" Height="32"></materialDesign:PackIcon>
<TextBlock FontSize="16" VerticalAlignment="Center" Margin="10 0 0 0">Sign out</TextBlock>
</StackPanel>
</ListBoxItem>
</StackPanel>
</DockPanel>
</materialDesign:DrawerHost.LeftDrawerContent>
<DockPanel>
<materialDesign:ColorZone Padding="16" materialDesign:ShadowAssist.ShadowDepth="Depth2"
Mode="PrimaryMid" DockPanel.Dock="Top">
<DockPanel>
<ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" IsChecked="{Binding IsMenuOpened}"
x:Name="MenuToggleButton"/>
<Grid>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Height="60" HorizontalAlignment="Center">
<TextBlock Text="TANGO" VerticalAlignment="Center" Margin="20 0 0 0" FontSize="36"/>
</StackPanel>
</Grid>
</DockPanel>
</materialDesign:ColorZone>
<Grid>
<Grid Background="Gainsboro">
<controls:NavigationControl TransitionAlwaysFades="True" TransitionType="Zoom" x:Name="TransitionControl" x:FieldModifier="public">
<local:JobsView controls:NavigationControl.NavigationName="JobsView"></local:JobsView>
</controls:NavigationControl>
</Grid>
</Grid>
</DockPanel>
</materialDesign:DrawerHost>
</Grid>
</UserControl>
|