aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
blob: ea6e93412744f2092da539487dc2460b26c4e37c (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
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
1
using MaterialDesignThemes.Wpf;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using Tango.SharedUI;

namespace Tango.MachineStudio.Common.Notifications
{
    /// <summary>
    /// Represents the Machine Studio user notification provider responsible for displaying information, alerts and dialogs to the user.
    /// </summary>
    public interface INotificationProvider
    {
        /// <summary>
        /// Gets the collection of active task items.
        /// </summary>
        ObservableCollection<TaskItem> TaskItems { get; }

        /// <summary>
        /// Gets the collection of active bar items.
        /// </summary>
        ObservableCollection<BarItem> BarItems { get; }

        /// <summary>
        /// Gets the current displayed task item.
        /// </summary>
        TaskItem CurrentTaskItem { get; }

        /// <summary>
        /// Gets a value indicating whether there are any queued task items.
        /// </summary>
        bool HasTaskItems { get; }

        /// <summary>
        /// Pushes the specified task item to the queue.
        /// </summary>
        /// <param name="taskItem">The task item.</param>
        void PushTaskItem(TaskItem taskItem);

        /// <summary>
        /// Create and push a new task item from the specified message.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <returns></returns>
        TaskItem PushTaskItem(String message);

        /// <summary>
        /// Creates and push a new bar item from the specified framework element.
        /// </summary>
        /// <param name="element">The element.</param>
        /// <returns></returns>
        BarItem PushBarItem(FrameworkElement element);

        /// <summary>
        /// Pushes the specified bar item.
        /// </summary>
        /// <param name="barItem">The bar item.</param>
        /// <returns></returns>
        BarItem PushBarItem(BarItem barItem);

        /// <summary>
        /// Removed the specified task item from the queue.
        /// </summary>
        /// <param name="taskItem">The task item.</param>
        void PopTaskItem(TaskItem taskItem);

        /// <summary>
        /// Removed the specified bar item.
        /// </summary>
        /// <param name="barItem">The bar item.</param>
        void PopBarItem(BarItem barItem);

        /// <summary>
        /// Creates a new instance of the specified View type and displays it as a modal dialog.
        /// </summary>
        /// <typeparam name="View">The type of the view.</typeparam>
        /// <typeparam name="VM">The type of the view model.</typeparam>
        /// <param name="onAccept">Accept button callback.</param>
        /// <param name="onCancel">Cancel button callback.</param>
        void ShowModalDialog<View, VM>(Action<VM> onAccept, Action onCancel) where View : FrameworkElement where VM : DialogViewVM;

        /// <summary>
        /// Creates a new view by a naming convention of the specified view model type.
        /// </summary>
        /// <typeparam name="VM">The type of the view model.</typeparam>
        /// <param name="onAccept">Accept button callback.</param>
        /// <param name="onCancel">Cancel button callback.</param>
        void ShowModalDialog<VM>(Action<VM> onAccept, Action onCancel) where VM : DialogViewVM;

        /// <summary>
        ///  Shows the specified view with the specified view model as it's data context.
        /// </summary>
        /// <typeparam name="VM">The type of the mm.</typeparam>
        /// <typeparam name="View">The type of the view.</typeparam>
        /// <param name="vm">The view model.</param>
        /// <param name="onAccept">The accept action.</param>
        /// <param name="onCancel">The cancel action.</param>
        void ShowModalDialog<VM, View>(VM vm, Action<VM> onAccept, Action onCancel) where View : FrameworkElement where VM : DialogViewVM;

        /// <summary>
        ///  Shows the specified view with the specified view model as it's data context.
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<controls:View x:Class="Tango.MachineStudio.UI.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:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
             xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
             xmlns:dockablz="clr-namespace:Dragablz.Dockablz;assembly=Dragablz"
             xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
             xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:common="clr-namespace:Tango.MachineStudio.Common;assembly=Tango.MachineStudio.Common"
             xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
             xmlns:operations="clr-namespace:Tango.Integration.Operation;assembly=Tango.Integration"
             xmlns:gif="clr-namespace:Tango.AnimatedGif;assembly=Tango.AnimatedGif"
             xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
             xmlns:commonConverters="clr-namespace:Tango.MachineStudio.Common.Converters;assembly=Tango.MachineStudio.Common"
             mc:Ignorable="d" 
             d:DesignHeight="720" d:DesignWidth="1270" Background="Transparent" DataContext="{Binding MainViewVM, Source={StaticResource Locator}}" x:Name="control">

    <UserControl.Resources>
        <converters:StringEllipsisConverter x:Key="StringEllipsisConverter" />
        <converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
        <converters:NullObjectToBooleanConverter x:Key="NullObjectToBooleanConverter" />
        <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
        <converters:StringToWordsConverter x:Key="StringToWordsConverter" />
        <commonConverters:PermissionToVisibilityConverter x:Key="PermissionToVisibilityConverter" />
        <converters:VersionToShortVersionConverter x:Key="VersionToShortVersionConverter" />
        <converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" />
    </UserControl.Resources>

    <Grid>
        <Grid.Style>
            <Style TargetType="Grid">
                <Style.Triggers>
                    <DataTrigger Binding="{Binding NotificationProvider.HasTaskItems}" Value="True">
                        <Setter Property="Cursor" Value="AppStarting"></Setter>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding NotificationProvider.HasTaskItems}" Value="False">
                        <Setter Property="Cursor" Value="Arrow"></Setter>
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </Grid.Style>

        <materialDesign:DrawerHost IsLeftDrawerOpen="{Binding Source={x:Reference MenuToggleButton}, Path=IsChecked}">
            <materialDesign:DrawerHost.LeftDrawerContent>
                <DockPanel LastChildFill="False" >
                    <DockPanel.Style>
                      
tyle> <StackPanel MinWidth="300" DockPanel.Dock="Top" > <Grid> <Button Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding HomeCommand}" HorizontalAlignment="Left" HorizontalContentAlignment="Left" Margin="5 10 0 0" Width="200" Height="40" Padding="5 8 8 8" Foreground="{StaticResource BlackBrush}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon VerticalAlignment="Center" Kind="Home" Width="32" Height="32" Foreground="{StaticResource HomePageForeground}"></materialDesign:PackIcon> <TextBlock FontSize="16" VerticalAlignment="Center" Margin="10 0 0 0" Foreground="{StaticResource HomePageForeground}">Home</TextBlock> </StackPanel> </Button> <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" HorizontalAlignment="Right" Margin="16" IsChecked="{Binding Source={x:Reference MenuToggleButton}, Path=IsChecked, Mode=TwoWay}" /> </Grid> <StackPanel Margin="0 16 0 0"> </StackPanel> <StackPanel Margin="10 10 0 0"> <TextBlock Foreground="{StaticResource borderBrush}" FontSize="16" FontWeight="Bold" FontStyle="Italic">MODULES</TextBlock> <Separator Background="{StaticResource BorderBrushGainsboro}" /> </StackPanel> <ListBox ItemsSource="{Binding StudioModuleLoader.UserModules}" HorizontalContentAlignment="Stretch" FontSize="14"> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem" BasedOn="{StaticResource MaterialDesignListBoxItem}"> <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter> <Setter Property="VerticalContentAlignment" Value="Stretch"></Setter> <Setter Property="Visibility" Value="{Binding InNewWindow,Converter={StaticResource BooleanToVisibilityInverseConverter}}"></Setter> </Style> </ListBox.ItemContainerStyle> <ListBox.ItemTemplate> <DataTemplate> <Grid Background="Transparent"> <i:Interaction.Triggers> <i:EventTrigger EventName="PreviewMouseUp"> <i:InvokeCommandAction Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.StartModuleCommand}" CommandParameter="{Binding}"></i:InvokeCommandAction> </i:EventTrigger> </i:Interaction.Triggers> <StackPanel Orientation="Horizontal" Margin="0 0 0 0" ToolTip="{Binding Description}"> <Ellipse Height="35" Width="35" VerticalAlignment="Center"> <Ellipse.Fill> <ImageBrush ImageSource="{Binding Image}" RenderOptions.BitmapScalingMode="Fant" /> </Ellipse.Fill> </Ellipse> <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding Name}"></TextBlock> </StackPanel> </Grid> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </StackPanel> <StackPanel DockPanel.Dock="Bottom"> <Separator Margin="0 10 0 0" Background="{StaticResource BorderBrushGainsboro}" /> <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" Background="{StaticResource MainWindow.Header}"> <DockPanel> <StackPanel Orientation="Horizontal"> <ToggleButton VerticalAlignment="Center" Style="{StaticResource MaterialDesignHamburgerToggleButton}" IsChecked="{Binding IsMenuOpened}" x:Name="MenuToggleButton"/> <StackPanel Margin="10 0 0 0" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center"> <Image Source="/Images/login_white.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> </StackPanel> <materialDesign:PopupBox DockPanel.Dock="Right" PlacementMode="BottomAndAlignRightEdges" StaysOpen="False" > <StackPanel> <Button Command="{Binding ConnectCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="LanConnect" Width="24" Height="24" /> <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">Machine Connection</TextBlock> </StackPanel> </Button> <Button Command="{Binding DisconnectCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="LanDisconnect" Width="24" Height="24" /> <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">Disconnect Machine</TextBlock> </StackPanel> </Button> <Separator/> <Button IsEnabled="{Binding IsModuleLoaded}" Command="{Binding OpenModuleInWindowCommand,Mode=TwoWay}" CommandParameter="{Binding CurrentModule}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="ArrowTopRight" Width="24" Height="24" /> <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">Open Module In New Window</TextBlock> </StackPanel> </Button> <Separator/> <Button Command="{Binding UpdateCenterCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Download" Width="24" Height="24" /> <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">Update Center</TextBlock> </StackPanel> </Button> <Separator/> <Button Command="{Binding ToggleSpeechCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Width="24" Height="24"> <materialDesign:PackIcon.Style> <Style TargetType="materialDesign:PackIcon"> <Setter Property="Kind" Value="VolumeHigh"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding SpeechProvider.Mute}" Value="True"> <Setter Property="Kind" Value="VolumeOff"></Setter> </DataTrigger> </Style.Triggers> </Style> </materialDesign:PackIcon.Style> </materialDesign:PackIcon> <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">Speech</TextBlock> </StackPanel> </Button> <StackPanel Visibility="{Binding AuthenticationProvider.CurrentUser,Converter={StaticResource PermissionToVisibilityConverter},ConverterParameter={x:Static enumerations:Permissions.RunDeveloperConsole}}"> <Separator/> <Button Command="{Binding OpenDeveloperConsoleCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Console" Width="24" Height="24" /> <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">Developer Console</TextBlock> </StackPanel> </Button> <Separator/> </StackPanel> <Separator/> <MenuItem x:Name="menuTheme" Header="Theme" MouseEnter="MenuItem_MouseEnter"> <MenuItem Header="Light" Command="{Binding ChangeAppThemeCommand}" CommandParameter="{x:Static common:MachineStudioTheme.Light}" Background="{StaticResource MainWindow.SubMenuItem.Background}"></MenuItem> <MenuItem Header="Dark" Command="{Binding ChangeAppThemeCommand}" CommandParameter="{x:Static common:MachineStudioTheme.Dark}" Background="{StaticResource MainWindow.SubMenuItem.Background}"></MenuItem> </MenuItem> <Separator/> <Button Command="{Binding AboutCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Information" Width="24" Height="24" /> <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">About</TextBlock> </StackPanel> </Button> <Separator /> <Button Command="{Binding ExitCommand}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="CloseCircleOutline" Width="24" Height="24" /> <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">Exit</TextBlock> </StackPanel> </Button> </StackPanel> </materialDesign:PopupBox> <Grid> <Grid> <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Height="60" HorizontalAlignment="Center"> <StackPanel.Style> <Style TargetType="StackPanel"> <Style.Triggers> <DataTrigger Binding="{Binding IsModuleLoaded}" Value="True"> <DataTrigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="00:00:0.5" /> </Storyboard> </BeginStoryboard> </DataTrigger.EnterActions> <DataTrigger.ExitActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="00:00:0.5" /> </Storyboard> </BeginStoryboard> </DataTrigger.ExitActions> </DataTrigger> </Style.Triggers> </Style> </StackPanel.Style> <Image Source="{StaticResource MachineSmall}" RenderOptions.BitmapScalingMode="Fant"></Image> <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="36" Text="Machine Studio"> </TextBlock> </StackPanel> <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Height="60" HorizontalAlignment="Center"> <StackPanel.Style> <Style TargetType="StackPanel"> <Setter Property="Opacity" Value="0"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding IsModuleLoaded}" Value="True"> <DataTrigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="00:00:0.5" /> </Storyboard> </BeginStoryboard> </DataTrigger.EnterActions> <DataTrigger.ExitActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="00:00:0.5" /> </Storyboard> </BeginStoryboard> </DataTrigger.ExitActions> </DataTrigger> </Style.Triggers> </Style> </StackPanel.Style> <Grid> <Ellipse Height="50" Width="50" VerticalAlignment="Center" StrokeThickness="1" Stroke="White"> <Ellipse.Fill> <ImageBrush ImageSource="{Binding CurrentModule.Image}" RenderOptions.BitmapScalingMode="Fant" /> </Ellipse.Fill> </Ellipse> <Image Source="{StaticResource MachineSmall}" RenderOptions.BitmapScalingMode="Fant" Width="25" Margin="-40 0 0 -30" ></Image> </Grid> <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="36" Text="{Binding CurrentModule.Name}"> </TextBlock> </StackPanel> </Grid> <Grid HorizontalAlignment="Right"> <StackPanel Orientation="Horizontal" VerticalAlignment="Center"> <Grid Margin="0 0 20 0"> <ItemsControl ItemsSource="{Binding NotificationProvider.BarItems}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Horizontal" IsItemsHost="True" VerticalAlignment="Center"></StackPanel> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <ContentControl Margin="0 0 10 0" Content="{Binding Element}" VerticalAlignment="Center"></ContentControl> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> </Grid> <Button VerticalAlignment="Center" Margin="10 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" FontSize="12" ToolTip="Connect to machine on the local network" BorderThickness="0" Command="{Binding ConnectCommand}"> <StackPanel Orientation="Horizontal"> <Grid> <StackPanel Orientation="Horizontal" VerticalAlignment="Center"> <TextBlock Text="Machine Connection" VerticalAlignment="Center" Foreground="White"></TextBlock> <materialDesign:PackIcon Margin="10 0 0 0" Width="24" Height="24"> <materialDesign:PackIcon.Style> <Style TargetType="materialDesign:PackIcon"> <Setter Property="Foreground" Value="{StaticResource GrayBrush300}"></Setter> <Setter Property="Kind" Value="LanDisconnect"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding ApplicationManager.IsMachineConnected,Mode=OneWay}" Value="True"> <Setter Property="Foreground" Value="{StaticResource GreenMConnectionBrush}"></Setter> <Setter Property="Kind" Value="LanConnect"></Setter> </DataTrigger> </Style.Triggers> </Style> </materialDesign:PackIcon.Style> </materialDesign:PackIcon> </StackPanel> </Grid> </StackPanel> </Button> <Grid Height="Auto" Width="Auto" VerticalAlignment="Center" Margin="5 0 20 0" ToolTip="{Binding ApplicationManager.ConnectedMachine.Status,Converter={StaticResource EnumToDescriptionConverter}}"> <Grid.Style> <Style TargetType="Grid"> <Setter Property="Visibility" Value="Visible"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding ApplicationManager.ConnectedMachine}" Value="{x:Null}"> <Setter Property="Visibility" Value="Collapsed"></Setter> </DataTrigger> </Style.Triggers> </Style> </Grid.Style> <Ellipse Width="40" Height="40"> <Ellipse.Fill> <RadialGradientBrush> <GradientStop Offset="0" Color="White" /> <GradientStop Offset="1" Color="#6BFFFFFF" /> </RadialGradientBrush> </Ellipse.Fill> </Ellipse> <Image x:Name="Image_MachineStatus" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Width="23" Height="23" VerticalAlignment="Center" gif:ImageBehavior.EnableAnimation="True" gif:ImageBehavior.SpeedRatio="1"> <Image.Style> <Style TargetType="Image"> <Setter Property="gif:ImageBehavior.AnimatedSource" Value="{x:Null}"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding ApplicationManager.ConnectedMachine.Status}" Value="{x:Static operations:MachineStatuses.Disconnected}"> <Setter Property="gif:ImageBehavior.AnimatedSource" Value="/Images/Statuses/machine_off_Anim.gif"></Setter> </DataTrigger> <DataTrigger Binding="{Binding ApplicationManager.ConnectedMachine.Status}" Value="{x:Static operations:MachineStatuses.PowerUp}"> <Setter Property="gif:ImageBehavior.AnimatedSource" Value="/Images/Statuses/getting_ready_Anim.gif"></Setter> </DataTrigger> <DataTrigger Binding="{Binding ApplicationManager.ConnectedMachine.Status}" Value="{x:Static operations:MachineStatuses.Standby}"> <Setter Property="gif:ImageBehavior.AnimatedSource" Value="/Images/Statuses/standby_Anim.gif"></Setter> </DataTrigger> <DataTrigger Binding="{Binding ApplicationManager.ConnectedMachine.Status}" Value="{x:Static operations:MachineStatuses.ReadyToDye}"> <Setter Property="gif:ImageBehavior.AnimatedSource" Value="/Images/Statuses/Ready_Anim.gif"></Setter> </DataTrigger> <DataTrigger Binding="{Binding ApplicationManager.ConnectedMachine.Status}" Value="{x:Static operations:MachineStatuses.GettingReady}"> <Setter Property="gif:ImageBehavior.AnimatedSource" Value="/Images/Statuses/getting_ready_Anim.gif"></Setter> </DataTrigger> <DataTrigger Binding="{Binding ApplicationManager.ConnectedMachine.Status}" Value="{x:Static operations:MachineStatuses.Printing}"> <Setter Property="gif:ImageBehavior.AnimatedSource" Value="/Images/Statuses/dyeing_Anim.gif"></Setter> </DataTrigger> <DataTrigger Binding="{Binding ApplicationManager.ConnectedMachine.Status}" Value="{x:Static operations:MachineStatuses.ShuttingDown}"> <Setter Property="gif:ImageBehavior.AnimatedSource" Value="/Images/Statuses/shutdown_icon_Anim.gif"></Setter> </DataTrigger> <DataTrigger Binding="{Binding ApplicationManager.ConnectedMachine.Status}" Value="{x:Static operations:MachineStatuses.Error}"> <Setter Property="gif:ImageBehavior.AnimatedSource" Value="/Images/Statuses/error_Anim.gif"></Setter> </DataTrigger> <DataTrigger Binding="{Binding ApplicationManager.ConnectedMachine.Status}" Value="{x:Static operations:MachineStatuses.Service}"> <Setter Property="gif:ImageBehavior.AnimatedSource" Value="/Images/Statuses/service_Anim.gif"></Setter> </DataTrigger> </Style.Triggers> </Style> </Image.Style> </Image> </Grid> <ToggleButton Visibility="{Binding ApplicationManager.ConnectedMachine.MachineEventsStateProvider.HasEvents,Converter={StaticResource BooleanToVisibilityConverter},FallbackValue=Collapsed,TargetNullValue=Collapsed,Mode=OneWay}" IsChecked="{Binding IsMachineErrorsOpened}" Style="{StaticResource emptyToggleButton}" Margin="0 0 10 0" Cursor="Hand"> <ToggleButton.ToolTip> <TextBlock> <Run>Press to view</Run> <Run Text="{Binding ApplicationManager.ConnectedMachine.MachineEventsStateProvider.Events.Count,Mode=OneWay}"></Run> <Run>hardware messages</Run> </TextBlock> </ToggleButton.ToolTip> <Grid RenderTransformOrigin="0.5,0.5"> <Grid.Style> <Style TargetType="Grid"> <Setter Property="Opacity" Value="1"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding ApplicationManager.ConnectedMachine.MachineEventsStateProvider.HasEvents}" Value="True"> <DataTrigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Duration="00:00:01" RepeatBehavior="Forever"> <DiscreteDoubleKeyFrame KeyTime="00:00:00" Value="1" /> <DiscreteDoubleKeyFrame KeyTime="00:00:0.5" Value="0" /> </DoubleAnimationUsingKeyFrames> </Storyboard> </BeginStoryboard> </DataTrigger.EnterActions> <DataTrigger.ExitActions> <BeginStoryboard> <Storyboard> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Duration="00:00:00"> <DiscreteDoubleKeyFrame KeyTime="00:00:00" Value="1" /> </DoubleAnimationUsingKeyFrames> </Storyboard> </BeginStoryboard> </DataTrigger.ExitActions> </DataTrigger> </Style.Triggers> </Style> </Grid.Style> <Image Source="/Images/warning.png" Width="50" /> </Grid> </ToggleButton> <Button Style="{StaticResource emptyButton}" Cursor="Hand" Command="{Binding UpdateCenterCommand}" Visibility="{Binding IsUpdateAvailable,Converter={StaticResource BooleanToVisibilityConverter}}"> <Button.ToolTip> <TextBlock> <Run>Version</Run> <Run Text="{Binding LatestVersion,Converter={StaticResource VersionToShortVersionConverter},ConverterParameter='3'}"></Run> <Run>is available !</Run> </TextBlock> </Button.ToolTip> <Image Source="/Images/update.png" Width="32" RenderTransformOrigin="0.5,0.5" RenderOptions.BitmapScalingMode="Fant"> <Image.RenderTransform> <ScaleTransform ScaleX="1" ScaleY="1" /> </Image.RenderTransform> <Image.Style> <Style TargetType="Image"> <Style.Triggers> <EventTrigger RoutedEvent="Loaded"> <EventTrigger.Actions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="0.9" To="1.1" Duration="00:00:0.5" RepeatBehavior="Forever" AutoReverse="True"></DoubleAnimation> <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="0.9" To="1.1" Duration="00:00:0.5" RepeatBehavior="Forever" AutoReverse="True"></DoubleAnimation> </Storyboard> </BeginStoryboard> </EventTrigger.Actions> </EventTrigger> </Style.Triggers> </Style> </Image.Style> </Image> </Button> <Button Cursor="Hand" Command="{Binding ReportIssueCommand}" IsEnabled="{Binding TFSClient.IsInitialized}"> <Button.Style> <Style TargetType="Button" BasedOn="{StaticResource emptyButton}"> <Setter Property="ToolTip" Value="Report issue"></Setter> <Setter Property="Opacity" Value="1"></Setter> <Style.Triggers> <Trigger Property="IsEnabled" Value="False"> <Setter Property="ToolTip" Value="The team foundation service is not available."></Setter> <Setter Property="Opacity" Value="0.5"></Setter> </Trigger> </Style.Triggers> </Style> </Button.Style> <Image Margin="10 0 0 0" Source="/Images/bug.png" Width="24" RenderOptions.BitmapScalingMode="Fant" /> </Button> <Button Cursor="Hand" Command="{Binding OpenResolvedBugsCommand}"> <Button.Style> <Style TargetType="Button" BasedOn="{StaticResource emptyButton}"> <Setter Property="Visibility" Value="Visible"></Setter> <Style.Triggers> <EventTrigger RoutedEvent="Loaded"> <EventTrigger.Actions> <BeginStoryboard> <Storyboard> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Duration="00:00:01" RepeatBehavior="Forever"> <DiscreteDoubleKeyFrame KeyTime="00:00:00" Value="1" /> <DiscreteDoubleKeyFrame KeyTime="00:00:0.5" Value="0" /> </DoubleAnimationUsingKeyFrames> </Storyboard> </BeginStoryboard> </EventTrigger.Actions> </EventTrigger> <DataTrigger Binding="{Binding TFSClient.ResolvedWorkItems.Count}" Value="0"> <Setter Property="Visibility" Value="Collapsed"></Setter> </DataTrigger> </Style.Triggers> </Style> </Button.Style> <Button.ToolTip> <TextBlock> <Run>There are</Run> <Run Text="{Binding TFSClient.ResolvedWorkItems.Count,Mode=OneWay}"></Run> <Run>issues waiting for your approval</Run> </TextBlock> </Button.ToolTip> <Image Margin="10 0 0 0" Source="/Images/bug-resolved.png" Width="24" RenderOptions.BitmapScalingMode="Fant" /> </Button> </StackPanel> </Grid> </Grid> </DockPanel> </materialDesign:ColorZone> <Grid> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="1*"/> </Grid.RowDefinitions> <Grid Grid.Row="1"> <controls:NavigationControl x:Name="NavigationControl" TransitionAlwaysFades="True" TransitionType="Zoom"> <Grid controls:NavigationControl.NavigationName="Home"> <Grid.RowDefinitions> <RowDefinition Height="150"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid> <StackPanel Margin="30 20" HorizontalAlignment="Left" TextElement.Foreground="#9A9A9A"> <TextBlock FontSize="35">Welcome to Machine Studio</TextBlock> <TextBlock HorizontalAlignment="Left" Margin="350 5 0 0" FontStyle="Italic" FontSize="16">The below modules are displayed according to your user roles and permissions.</TextBlock> </StackPanel> </Grid> <Grid Grid.Row="2"> <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto"> <ItemsControl ItemsSource="{Binding StudioModuleLoader.UserModules}" Margin="10" IsEnabled="{Binding IsApplicationReady}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPanel IsItemsHost="True"></WrapPanel> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <materialDesign:Card Background="{StaticResource WhiteBackgroundBrush}" Foreground="{StaticResource JobFieldForeground}" Width="300" Margin="10" Height="400" Visibility="{Binding InNewWindow,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="180" /> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Image Opacity="{StaticResource HomeImageOpacity}" Source="{Binding Image,Mode=OneWay}" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" /> <Rectangle VerticalAlignment="Bottom" Stroke="{StaticResource borderBrush}"></Rectangle> <Button Tag="{Binding}" AutomationProperties.AutomationId="{Binding Name}" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.StartModuleCommand}" CommandParameter="{Binding}" Grid.Row="0" Margin="0,0,20,-35" HorizontalAlignment="Right" Width="70" Height="70" VerticalAlignment="Bottom" Style="{StaticResource MaterialDesignFloatingActionMiniButton}" ToolTip="Start this module"> <materialDesign:PackIcon Kind="Play" Width="30" Height="30" /> </Button> <StackPanel Grid.Row="1" Margin="8,24,8,0"> <TextBlock FontWeight="Bold" FontSize="20" Text="{Binding Name,Mode=OneWay}" Foreground="{StaticResource HomePageForeground}"></TextBlock> <TextBlock VerticalAlignment="Center" Margin="0 5 0 0" FontSize="14" TextWrapping="Wrap" Text="{Binding Description,Mode=OneWay}" Foreground="{StaticResource HomePageForeground}"></TextBlock> </StackPanel> <StackPanel Grid.Row="2" Margin="8" HorizontalAlignment="Right" Orientation="Horizontal"> <materialDesign:PopupBox Padding="2,0,2,0" Style="{StaticResource MaterialDesignToolPopupBox}"> <StackPanel> <Button Command="{Binding Source={x:Reference control},Path=DataContext.OpenModuleInWindowCommand}" CommandParameter="{Binding}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="ArrowTopRight" Width="24" Height="24" /> <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">Start in new window</TextBlock> </StackPanel> </Button> <Button> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Settings" Width="24" Height="24" /> <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">Settings</TextBlock> </StackPanel> </Button> </StackPanel> </materialDesign:PopupBox> </StackPanel> </Grid> </materialDesign:Card> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> </ScrollViewer> </Grid> </Grid> </controls:NavigationControl> </Grid> </Grid> <Border HorizontalAlignment="Right" Margin="0 -1 10 0" VerticalAlignment="Top" Width="300" Height="Auto" CornerRadius="0 0 30 30" BorderThickness="1 0 1 1" BorderBrush="DimGray"> <Border.Style> <Style TargetType="Border"> <Setter Property="Background" Value="{StaticResource LoadingBorderGradientBrush}"/> <Setter Property="RenderTransform"> <Setter.Value> <ScaleTransform ScaleX="1" ScaleY="0"></ScaleTransform> </Setter.Value> </Setter> <Style.Triggers> <DataTrigger Binding="{Binding NotificationProvider.HasTaskItems}" Value="True"> <DataTrigger.EnterActions> <BeginStoryboard HandoffBehavior="Compose"> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" FillBehavior="HoldEnd" To="1" Duration="00:00:0.2"></DoubleAnimation> </Storyboard> </BeginStoryboard> </DataTrigger.EnterActions> <DataTrigger.ExitActions> <BeginStoryboard HandoffBehavior="Compose"> <Storyboard> <DoubleAnimation FillBehavior="HoldEnd" Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" From="1" Duration="00:00:0.5"></DoubleAnimation> </Storyboard> </BeginStoryboard> </DataTrigger.ExitActions> </DataTrigger> </Style.Triggers> </Style> </Border.Style> <!--<Border.Background> <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> <GradientStop Color="#03A9F4"/> <GradientStop Color="#0081BB" Offset="1"/> </LinearGradientBrush> </Border.Background>--> <ItemsControl ItemsSource="{Binding NotificationProvider.TaskItems}"> <ItemsControl.ItemTemplate> <DataTemplate> <Border Margin="5"> <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="20 0 0 0"> <mahapps:ProgressRing Width="24" Height="24" Foreground="White"></mahapps:ProgressRing> <TextBlock Text="{Binding Message,Converter={StaticResource StringEllipsisConverter},ConverterParameter=35}" Foreground="White" VerticalAlignment="Center" Margin="10 0 0 0" TextWrapping="Wrap"></TextBlock> </StackPanel> </Border> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> </Border> <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="10" Visibility="{Binding IsMachineErrorsOpened,Converter={StaticResource BooleanToVisibilityConverter}}"> <Border Width="350" Background="{StaticResource WhiteBrush50}" BorderBrush="{StaticResource WhiteBackgroundBrush}" CornerRadius="5" Padding="5"> <Border.Effect> <DropShadowEffect ShadowDepth="0" BlurRadius="10" /> </Border.Effect> <ItemsControl ItemsSource="{Binding ApplicationManager.ConnectedMachine.MachineEventsStateProvider.Events}"> <ItemsControl.ItemTemplate> <DataTemplate DataType="{x:Type entities:MachinesEvent}"> <Border BorderThickness="0 0 0 1" BorderBrush="{StaticResource WhiteBrush100}" Padding="5"> <DockPanel> <Grid DockPanel.Dock="Right" HorizontalAlignment="Right" VerticalAlignment="Center"> <ContentControl> <ContentControl.Style> <Style TargetType="ContentControl"> <Setter Property="Content" Value="{x:Null}"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding EventType.RequiresUserIntervention}" Value="True"> <Setter Property="Content"> <Setter.Value> <Button ToolTip="Resolve issue" Style="{StaticResource emptyButton}" Cursor="Hand" Margin="5" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ResolveMachineEventCommand}" CommandParameter="{Binding}"> <Image Source="/Images/settings.png" Width="24"> <Image.Style> <Style TargetType="Image"> <Style.Triggers> <EventTrigger RoutedEvent="Loaded"> <EventTrigger.Actions> <BeginStoryboard> <Storyboard> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Duration="00:00:01" RepeatBehavior="Forever"> <DiscreteDoubleKeyFrame KeyTime="00:00:00" Value="1" /> <DiscreteDoubleKeyFrame KeyTime="00:00:0.5" Value="0" /> </DoubleAnimationUsingKeyFrames> </Storyboard> </BeginStoryboard> </EventTrigger.Actions> </EventTrigger> </Style.Triggers> </Style> </Image.Style> </Image> </Button> </Setter.Value> </Setter> </DataTrigger> </Style.Triggers> </Style> </ContentControl.Style> </ContentControl> </Grid> <StackPanel> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Width="24" Height="24"> <materialDesign:PackIcon.Style> <Style TargetType="materialDesign:PackIcon"> <Setter Property="Kind" Value="AlertCircle"></Setter> <Setter Property="Foreground" Value="#464646"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding Category}" Value="Warning"> <Setter Property="Kind" Value="Alert"></Setter> <Setter Property="Foreground" Value="{StaticResource OrangeBrush}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Error"> <Setter Property="Kind" Value="AlertOctagon"></Setter> <Setter Property="Foreground" Value="{StaticResource RedBrush100}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding Category}" Value="Critical"> <Setter Property="Kind" Value="BellPlus"></Setter> <Setter Property="Foreground" Value="Red"></Setter> </DataTrigger> </Style.Triggers> </Style> </materialDesign:PackIcon.Style> </materialDesign:PackIcon> <StackPanel Margin="10 0 0 0" VerticalAlignment="Top"> <TextBlock Text="{Binding EventType.Name}"></TextBlock> <TextBlock Margin="0 5 0 0" Text="{Binding Description}" FontSize="10" Foreground="DimGray" TextWrapping="Wrap"></TextBlock> </StackPanel> </StackPanel> </StackPanel> </DockPanel> </Border> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> </Border> <Canvas HorizontalAlignment="Center"> <Polygon Points="12,0 0,31 24,31" Fill="{StaticResource WhiteBrush50}" Canvas.Top="-30" Canvas.Left="90"></Polygon> </Canvas> </Grid> </Grid> </DockPanel> </materialDesign:DrawerHost> </Grid> </controls:View>