blob: ac0d09e2422653aa62bf88abe60ad0591f34af1f (
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
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
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_Grid_Container" VerticalAlignment="Top" Background="Transparent" ClipToBounds="False">
<Canvas>
<Border x:Name="PART_BorderNotifications" BorderBrush="Silver" Background="#96000000" MaxHeight="{Binding RelativeSource={RelativeSource TemplatedParent},Path=MinNotificationHeight}" Width="{Binding RelativeSource={RelativeSource AncestorType=Canvas},Path=ActualWidth}">
<ItemsControl x:Name="notificationsItemsControl" ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent},Path=Notifications}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border BorderBrush="#757373" BorderThickness="0 0 0 5" Height="{Binding RelativeSource={RelativeSource AncestorType=local:TouchNotificationBar},Path=NotificationHeight}" MinHeight="{Binding RelativeSource={RelativeSource AncestorType=local:TouchNotificationBar},Path=MinNotificationHeight}" MaxHeight="{Binding RelativeSource={RelativeSource AncestorType=local:TouchNotificationBar},Path=MaxNotificationHeight}">
<Border.Background>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Color="#FF282828"/>
<GradientStop Color="#FF464646" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<ContentControl Content="{Binding}" ContentTemplate="{Binding RelativeSource={RelativeSource AncestorType=local:TouchNotificationBar},Path=NotificationTemplate}"></ContentControl>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Border>
</Canvas>
</Grid>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|