aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml94
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"