blob: 689981de6aac3997415b1780e6ae7c9fd409b26e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:local="clr-namespace:Tango.Touch.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/Colors.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type local:TouchNotificationBar}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TouchNotificationBar}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<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">
<Canvas>
<Border ClipToBounds="True" x:Name="PART_BorderDrag" VerticalAlignment="Top" Background="Transparent" Width="{Binding RelativeSource={RelativeSource AncestorType=Canvas},Path=ActualWidth}">
<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">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseUp">
<i:InvokeCommandAction Command="{Binding RelativeSource={RelativeSource AncestorType=local:TouchNotificationBar},Path=NotificationPressedCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>
<ContentControl Content="{Binding}" ContentTemplate="{Binding RelativeSource={RelativeSource AncestorType=local:TouchNotificationBar},Path=NotificationTemplate}"></ContentControl>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</local:LightTouchScrollViewer>
</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>
<Ellipse Fill="White" StrokeThickness="1" Stroke="{StaticResource TangoPrimaryAccentBrush}"/>
<TextBlock HorizontalAlignment="Center" FontSize="12" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=local:TouchNotificationBar},Path=Notifications.Count}"></TextBlock>
</Grid>
</Grid>
</Canvas>
</Grid>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|