diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-03-05 14:53:49 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-03-05 14:53:49 +0200 |
| commit | 499f4facfe296d984a44e9ce0b6e1eb23ba8d644 (patch) | |
| tree | bf554330362404128c36321a4fce3fd927caea82 /Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml | |
| parent | b292fb7ff234a973670ebf9e54b9e111a90f3639 (diff) | |
| download | Tango-499f4facfe296d984a44e9ce0b6e1eb23ba8d644.tar.gz Tango-499f4facfe296d984a44e9ce0b6e1eb23ba8d644.zip | |
Improvements and bug fixes on PPC.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml | 151 |
1 files changed, 124 insertions, 27 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml index 2743e5126..5d4428989 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml @@ -23,38 +23,38 @@ </UserControl.Resources> <Grid> - <touch:TouchSideMenu x:Name="menu" IsOpened="{Binding IsMenuOpened,Mode=TwoWay}" Grid.Row="1"> + <touch:TouchSideMenu x:Name="menu" IsOpened="{Binding IsMenuOpened,Mode=TwoWay}" Grid.Row="1" > <touch:TouchSideMenu.MenuContent> - <Border Width="400" x:Name="border" BorderThickness="0 0 1 0" BorderBrush="{StaticResource TangoDarkForegroundBrush}" TextElement.Foreground="{StaticResource TangoDarkForegroundBrush}"> + <Border TextElement.FontSize="{StaticResource TangoMenuItemFontSize}" TextElement.FontFamily="{StaticResource TangoFlexoFontFamily}" Width="450" x:Name="border" BorderThickness="0 0 1 0" BorderBrush="{StaticResource TangoDarkForegroundBrush}" TextElement.Foreground="{StaticResource TangoDarkForegroundBrush}"> <DockPanel LastChildFill="False" Background="{StaticResource TangoPrimaryBackgroundBrush}"> <StackPanel MinWidth="300" DockPanel.Dock="Top"> - <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 1"> + <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 1" Height="320"> <Grid> - <Image Source="/Images/logo.png" Stretch="Uniform" Margin="20 50 50 50"></Image> - <touch:TouchToggleButton Style="{StaticResource TangoTouchToggleButtonHamburger}" + <Image Source="/Images/logo.png" Stretch="Uniform" HorizontalAlignment="Left" Margin="40 0 0 0" Width="320"></Image> + <touch:TouchToggleButton Width="70" Height="70" Padding="15" Style="{StaticResource TangoTouchToggleButtonHamburger}" VerticalAlignment="Top" - HorizontalAlignment="Right" Margin="16" - IsChecked="{Binding ElementName=menu,Path=IsOpened}" /> + HorizontalAlignment="Right" + IsChecked="{Binding ElementName=menu,Path=IsOpened}" Foreground="{StaticResource TangoPrimaryAccentBrush}" /> </Grid> </Border> - <StackPanel Margin="0 5 0 0"> - <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="30" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding HomeCommand}" FontSize="{StaticResource TangoHeaderFontSize}"> + <!--<StackPanel Margin="0 5 0 0"> + <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="30" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding HomeCommand}" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="Normal"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="/Images/home.png" VerticalAlignment="Center" Width="48" Height="48"></Image> - <TextBlock VerticalAlignment="Center" Margin="20 0 0 0">Home</TextBlock> + <Image Source="/Images/home.png" VerticalAlignment="Center" Width="32" Height="32"></Image> + <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" Foreground="{StaticResource TangoPrimaryAccentBrush}">Home</TextBlock> </StackPanel> </touch:TouchButton> - </StackPanel> + </StackPanel>--> <ItemsControl ItemsSource="{Binding ModuleLoader.UserModules}"> <ItemsControl.ItemTemplate> <DataTemplate> <Border Visibility="{Binding DockToBottom,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> - <Border BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0 1 0 0" Visibility="{Binding IsVisibleInMenu,Converter={StaticResource BooleanToVisibilityConverter}}"> - <touch:TouchButton Margin="0 0 0 0" Padding="30" Foreground="{StaticResource TangoDarkForegroundBrush}" Style="{StaticResource TangoFlatButton}" FontSize="{StaticResource TangoHeaderFontSize}" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ModuleNavigationCommand}" CommandParameter="{Binding Name}"> + <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 1" Visibility="{Binding IsVisibleInMenu,Converter={StaticResource BooleanToVisibilityConverter}}"> + <touch:TouchButton Margin="0 0 0 0" Padding="40 25" Foreground="{StaticResource TangoDarkForegroundBrush}" Style="{StaticResource TangoFlatButton}" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ModuleNavigationCommand}" CommandParameter="{Binding Name}"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image VerticalAlignment="Center" Source="{Binding Image}" Width="48" Height="48"></Image> - <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" Text="{Binding Name}"></TextBlock> + <Image VerticalAlignment="Center" Source="{Binding Image}" Width="32" Height="32"></Image> + <TextBlock VerticalAlignment="Center" Margin="40 0 0 0" Text="{Binding Name}" Foreground="{StaticResource TangoPrimaryAccentBrush}"></TextBlock> </StackPanel> </touch:TouchButton> </Border> @@ -64,20 +64,18 @@ </ItemsControl> <StackPanel Margin="0 5 0 0"> - - <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 1 0 0"> - <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="30" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding UpdateCommand}" FontSize="{StaticResource TangoHeaderFontSize}"> + <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 1"> + <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="40 25" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding UpdateCommand}"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="/Images/right-arrow-64.png" VerticalAlignment="Center" Width="48" Height="48"></Image> - <TextBlock VerticalAlignment="Center" Margin="20 0 0 0">Update</TextBlock> + <Image Source="/Images/Menu/update.png" VerticalAlignment="Center" Width="32" Height="32"></Image> + <TextBlock VerticalAlignment="Center" Margin="40 0 0 0" Foreground="{StaticResource TangoPrimaryAccentBrush}">Update</TextBlock> </StackPanel> </touch:TouchButton> </Border> </StackPanel> </StackPanel> - <StackPanel DockPanel.Dock="Bottom"> - <Separator Margin="0 10 0 0" Background="{StaticResource TangoDividerBrush}" /> + <Grid DockPanel.Dock="Bottom"> <!--<touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="30" Command="{Binding SignOutCommand}" FontSize="{StaticResource TangoHeaderFontSize}" Foreground="{StaticResource TangoDarkForegroundBrush}"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> <touch:TouchIcon VerticalAlignment="Center" Angle="180" Icon="Logout" Width="32" Height="32"></touch:TouchIcon> @@ -85,7 +83,7 @@ </StackPanel> </touch:TouchButton>--> - <ItemsControl ItemsSource="{Binding ModuleLoader.UserModules}"> + <!--<ItemsControl ItemsSource="{Binding ModuleLoader.UserModules}"> <ItemsControl.ItemTemplate> <DataTemplate> <Border Visibility="{Binding DockToBottom,Converter={StaticResource BooleanToVisibilityConverter}}"> @@ -100,8 +98,107 @@ </Border> </DataTemplate> </ItemsControl.ItemTemplate> - </ItemsControl> - </StackPanel> + </ItemsControl>--> + + + <Border Background="{StaticResource TangoPowerMenuOpenedBackgroundBrush}" Height="350" Padding="20" RenderTransformOrigin="0.5,1" VerticalAlignment="Bottom"> + <Border.Style> + <Style TargetType="Border"> + <Setter Property="RenderTransform"> + <Setter.Value> + <ScaleTransform ScaleX="1" ScaleY="0" /> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding IsPowerOpened}" Value="True"> + <DataTrigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.EnterActions> + <DataTrigger.ExitActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.ExitActions> + </DataTrigger> + </Style.Triggers> + </Style> + </Border.Style> + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="1*"/> + <RowDefinition Height="1*"/> + </Grid.RowDefinitions> + + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="188*"/> + <ColumnDefinition Width="261*"/> + </Grid.ColumnDefinitions> + + <Image Source="/Images/power-machine.png" Margin="30" /> + + <UniformGrid Grid.Column="1" Rows="2"> + <touch:TouchButton HorizontalAlignment="Left" VerticalAlignment="Center" Padding="50 20" Height="Auto" Style="{StaticResource TangoLinkButton}" FontSize="{StaticResource TangoTitleFontSize}" Foreground="{StaticResource TangoPrimaryBackgroundBrush}">Turn Off</touch:TouchButton> + <touch:TouchButton HorizontalAlignment="Left" VerticalAlignment="Center" Padding="50 20" Height="Auto" Style="{StaticResource TangoLinkButton}" FontSize="{StaticResource TangoTitleFontSize}" Foreground="{StaticResource TangoPrimaryBackgroundBrush}">Stand By</touch:TouchButton> + </UniformGrid> + </Grid> + + <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="25 0" Opacity="0.3" StrokeThickness="1" Stroke="{StaticResource TangoDividerBrush}" /> + + <Grid Grid.Row="1"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="188*"/> + <ColumnDefinition Width="261*"/> + </Grid.ColumnDefinitions> + <Image Source="/Images/power-tablet.png" Margin="30" /> + + <touch:TouchButton Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Padding="50 20" Height="Auto" Style="{StaticResource TangoLinkButton}" Foreground="{StaticResource TangoPrimaryBackgroundBrush}" FontSize="{StaticResource TangoTitleFontSize}">Restart</touch:TouchButton> + </Grid> + </Grid> + </Border> + + <Border Background="{StaticResource TangoMidBackgroundBrush}" RenderTransformOrigin="0.5,1" VerticalAlignment="Bottom"> + <Border.Style> + <Style TargetType="Border"> + <Setter Property="RenderTransform"> + <Setter.Value> + <ScaleTransform ScaleX="1" ScaleY="1" /> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding IsPowerOpened}" Value="True"> + <DataTrigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.EnterActions> + <DataTrigger.ExitActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.ExitActions> + </DataTrigger> + </Style.Triggers> + </Style> + </Border.Style> + <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="40 25" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding PowerCommand}"> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> + <Image Source="/Images/menu/power.png" VerticalAlignment="Center" Width="32" Height="32"></Image> + <TextBlock VerticalAlignment="Center" Margin="40 0 0 0" Foreground="{StaticResource TangoPrimaryAccentBrush}">Power</TextBlock> + </StackPanel> + </touch:TouchButton> + </Border> + </Grid> </DockPanel> </Border> </touch:TouchSideMenu.MenuContent> @@ -111,7 +208,7 @@ <DockPanel> <Border BorderThickness="0 0 1 0" BorderBrush="{StaticResource TangoDividerBrush}"> <touch:TouchHamburgerButton Width="100" Height="100" Padding="15" Command="{Binding MenuOrBackCommand}" EnableDropShadow="False" Foreground="{StaticResource TangoPrimaryAccentBrush}" IsBack="{Binding NavigationManager.CanNavigateBack}"> - + </touch:TouchHamburgerButton> </Border> <Grid DockPanel.Dock="Right" Margin="0 0 20 0"> |
