aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Views
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2023-04-19 13:04:38 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2023-04-19 13:04:38 +0300
commit7ba903bb793adf638a7e1a5c7170e8a03bbb6ea9 (patch)
treeea8f80de80a9763ca482420aaa424f143a99af2c /Software/Visual_Studio/PPC/Tango.PPC.UI/Views
parent1133972c0c51feb478aa3944fad5f374a8a2da35 (diff)
downloadTango-7ba903bb793adf638a7e1a5c7170e8a03bbb6ea9.tar.gz
Tango-7ba903bb793adf638a7e1a5c7170e8a03bbb6ea9.zip
Menu Gui. Set selection item.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Views')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml39
1 files changed, 30 insertions, 9 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml
index d90ddd962..05e781566 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml
@@ -23,6 +23,7 @@
<localConverters:ItemBaseConverter x:Key="NotificationItemConverter" />
<localConverters:AppBarItemConverter x:Key="AppBarItemConverter" />
<localConverters:ItemBaseConverter x:Key="ItemBaseConverter" />
+ <localConverters:ComapareModulNameConverter x:Key="ComapareModulNameConverter"/>
</UserControl.Resources>
@@ -41,7 +42,7 @@
<StackPanel VerticalAlignment="Top">
<Border Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 0" >
<Grid >
- <Border Height="72" Background="{StaticResource TangoPrimaryBackgroundBrush}">
+ <Border Height="71" Background="{StaticResource TangoPrimaryBackgroundBrush}">
<Border.Effect>
<DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" />
</Border.Effect>
@@ -61,16 +62,36 @@
</Grid>
</Border>
- <ItemsControl ItemsSource="{Binding ModuleLoader.UserModules}" Margin="0 10 0 0">
+ <ItemsControl ItemsSource="{Binding ModuleLoader.UserModules}" Margin="0 0 0 0">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Visibility="{Binding DockToBottom,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
- <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 1" Visibility="{Binding IsVisibleInMenu,Converter={StaticResource BooleanToVisibilityConverter}}">
- <touch:TouchButton Margin="0 0 0 0" Padding="10 15" Foreground="{StaticResource TangoDarkForegroundBrush}" Style="{StaticResource TangoFlatButton}" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ModuleNavigationCommand}" CommandParameter="{Binding Name}" >
+ <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 0" Visibility="{Binding IsVisibleInMenu,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <touch:TouchButton Height="45" Margin="0 0 0 0" Padding="10 0" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ModuleNavigationCommand}" CommandParameter="{Binding Name}" >
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image VerticalAlignment="Center" Source="{Binding Image}" Width="20" Height="20"></Image>
- <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" Text="{Binding Name}" Foreground="{StaticResource TangoLightForegroundBrush}" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="Light"></TextBlock>
+ <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" Text="{Binding Name}" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="Light"></TextBlock>
</StackPanel>
+ <touch:TouchButton.Style>
+ <Style TargetType="touch:TouchButton" BasedOn="{StaticResource TangoFlatButton}" >
+ <Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}"></Setter>
+ <Setter Property="Background" Value="Transparent"/>
+ <Style.Triggers>
+ <DataTrigger Value="True">
+ <DataTrigger.Binding>
+ <MultiBinding Converter="{StaticResource ComapareModulNameConverter}" Delay="100">
+ <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.NavigationManager.CurrentModule"></Binding>
+ <Binding Path="Name"></Binding>
+ </MultiBinding>
+ </DataTrigger.Binding>
+ <DataTrigger.Setters>
+ <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter>
+ <Setter Property="Background" Value="{StaticResource TangoMidBackgroundBrush}"></Setter>
+ </DataTrigger.Setters>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </touch:TouchButton.Style>
</touch:TouchButton>
</Border>
</Border>
@@ -79,8 +100,8 @@
</ItemsControl>
<StackPanel Margin="0 5 0 0">
- <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 1">
- <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="10 15" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding UpdateCommand}">
+ <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 0">
+ <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="10 0" Height="45" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding UpdateCommand}">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="/Images/Menu/update.png" VerticalAlignment="Center" Width="20" Height="20"></Image>
<TextBlock VerticalAlignment="Center" Margin="20 0 0 0" Foreground="{StaticResource TangoLightForegroundBrush}" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="Light">Update</TextBlock>
@@ -89,8 +110,8 @@
</Border>
</StackPanel>
<StackPanel Margin="0 5 0 0">
- <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 1">
- <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="10 15" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding PowerCommand}">
+ <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 0">
+ <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="10 0" Height="45" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding PowerCommand}">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="/Images/menu/power.png" VerticalAlignment="Center" Width="20" Height="20" ></Image>
<TextBlock VerticalAlignment="Center" Margin="20 0 0 0" Foreground="{StaticResource TangoLightForegroundBrush}" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="Light">Power</TextBlock>