diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-07 16:09:29 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-07 16:09:29 +0200 |
| commit | fc50a3a0f5c1a7de61dd169ca175f3690177059a (patch) | |
| tree | 8efd928c974806957fd06d4bfdcafbfc45268cb6 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views | |
| parent | 3f5ba302842a906950b118c7f6683c061819d76e (diff) | |
| download | Tango-fc50a3a0f5c1a7de61dd169ca175f3690177059a.tar.gz Tango-fc50a3a0f5c1a7de61dd169ca175f3690177059a.zip | |
Implemented LogOut from machine studio.
Modified Machine Designer image.
Fixed issue with updating contact on DB Module.
Improved Machine Studio Drawer graphics.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml | 94 |
1 files changed, 61 insertions, 33 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml index 14858c049..d7d0f8dc3 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml @@ -29,52 +29,80 @@ <materialDesign:DrawerHost IsLeftDrawerOpen="{Binding ElementName=MenuToggleButton, Path=IsChecked}"> <materialDesign:DrawerHost.LeftDrawerContent> - <StackPanel MinWidth="300"> - <Grid> - <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" + <DockPanel LastChildFill="False"> + <StackPanel MinWidth="300" DockPanel.Dock="Top"> + <Grid> + <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" HorizontalAlignment="Right" Margin="16" IsChecked="{Binding ElementName=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> - <TextBlock FontSize="16" TextTrimming="CharacterEllipsis" MaxWidth="170" FontWeight="Bold" Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding AuthenticationProvider.CurrentUser.Contact.FullName}"></TextBlock> + <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> + <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> + </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> - </Grid> - <StackPanel Margin="0 16 0 0"> + <StackPanel Margin="10 10 0 0"> + <TextBlock Foreground="Silver" FontSize="16" FontWeight="Bold" FontStyle="Italic">MODULES</TextBlock> + <Separator Background="Gainsboro" /> + </StackPanel> + <ListBox ItemsSource="{Binding StudioModuleLoader.UserModules}" HorizontalContentAlignment="Stretch" FontSize="14"> + <ListBox.ItemContainerStyle> + <Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}"> + <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter> + <Setter Property="VerticalContentAlignment" Value="Stretch"></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="Gainsboro" /> <ListBoxItem> <i:Interaction.Triggers> <i:EventTrigger EventName="PreviewMouseUp"> - <i:InvokeCommandAction Command="{Binding HomeCommand}"></i:InvokeCommandAction> + <i:InvokeCommandAction Command="{Binding SignoutCommand}"></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> + <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> - <ListBox ItemsSource="{Binding StudioModuleLoader.UserModules}" HorizontalContentAlignment="Stretch"> - <ListBox.ItemContainerStyle> - <Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}"> - <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter> - <Setter Property="VerticalContentAlignment" Value="Stretch"></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> - - <TextBlock Text="{Binding Name}" ToolTip="{Binding Description}"></TextBlock> - </Grid> - </DataTemplate> - </ListBox.ItemTemplate> - </ListBox> - </StackPanel> + </DockPanel> </materialDesign:DrawerHost.LeftDrawerContent> <DockPanel> <materialDesign:ColorZone Padding="16" materialDesign:ShadowAssist.ShadowDepth="Depth2" |
