aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.xaml
diff options
context:
space:
mode:
authorMirta <mirta@twine-s.com>2020-12-30 16:39:52 +0200
committerMirta <mirta@twine-s.com>2020-12-30 16:39:52 +0200
commit00a491d93733d4625ad329b2ba8237f445364b3f (patch)
tree4b24c6fa78d7648f4bb7cefafa464bb0b063fec4 /Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.xaml
parent124ad4150f80c6846fdee41dbbda9848c105f6e5 (diff)
downloadTango-00a491d9.tar.gz
Tango-00a491d9.zip
merge
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.xaml')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.xaml18
1 files changed, 15 insertions, 3 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.xaml
index 689981de6..d097aa2bb 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.xaml
@@ -8,6 +8,7 @@
<ResourceDictionary Source="../Resources/Colors.xaml" />
</ResourceDictionary.MergedDictionaries>
+ <converters:GreaterThanToBooleanConverter x:Key="GreaterThanToBooleanConverter" />
<Style TargetType="{x:Type local:TouchNotificationBar}">
<Setter Property="Template">
@@ -26,6 +27,7 @@
<ContentPresenter Grid.Row="1" Content="{TemplateBinding Content}" />
<Grid x:Name="PART_GridMask" Grid.RowSpan="2" Background="{StaticResource TangoNotificationBarMaskBrush}" Opacity="0" IsHitTestVisible="False">
+
</Grid>
<Grid x:Name="PART_Grid_Container" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent},Path=NotificationBarVisibility}" VerticalAlignment="Top" Background="Transparent" ClipToBounds="False">
@@ -34,7 +36,6 @@
<Border x:Name="PART_BorderNotifications" VerticalAlignment="Top" BorderBrush="{StaticResource TangoNotificationBarBottomBorderBrush}" Background="{StaticResource TangoNotificationBarBackgroundBrush}">
<local:LightTouchScrollViewer x:Name="PART_ScrollViewer">
<ItemsControl x:Name="PART_ItemsControl" ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent},Path=Notifications}">
-
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Background="{StaticResource TangoNotificationBackgroundBrush}" BorderBrush="{StaticResource TangoNotificationBorderBrush}" BorderThickness="0 0 0 0">
@@ -52,9 +53,20 @@
</Border>
</Border>
- <Grid x:Name="PART_NotificationCounterGrid" Canvas.Left="41" Canvas.Top="19" Width="24" Height="24" HorizontalAlignment="Left" VerticalAlignment="Bottom" IsHitTestVisible="False" Visibility="Collapsed">
+ <Grid x:Name="PART_NotificationCounterGrid" Canvas.Left="41" Canvas.Top="19" Width="24" Height="24" HorizontalAlignment="Left" VerticalAlignment="Bottom" IsHitTestVisible="False">
<Grid>
- <Ellipse Fill="White" StrokeThickness="1" Stroke="{StaticResource TangoPrimaryAccentBrush}"/>
+ <Grid.Style>
+ <Style TargetType="Grid">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=local:TouchNotificationBar},Path=Notifications.Count,Converter={StaticResource GreaterThanToBooleanConverter},ConverterParameter=1}" Value="True">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Grid.Style>
+ <Ellipse Fill="White" StrokeThickness="1" Stroke="{StaticResource TangoPrimaryAccentBrush}">
+ </Ellipse>
<TextBlock HorizontalAlignment="Center" FontSize="12" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=local:TouchNotificationBar},Path=Notifications.Count}"></TextBlock>
</Grid>
</Grid>