blob: 2b8b4ff03d56e56c69a5022ed3a75e4889036877 (
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:components="clr-namespace:Tango.Touch.Components"
xmlns:local="clr-namespace:Tango.Touch.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/Colors.xaml" />
<ResourceDictionary Source="../Resources/Fonts.xaml" />
<ResourceDictionary>
<converters:LastItemInContainerToBooleanConverter x:Key="LastItemInContainerToBooleanConverter" />
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type local:TouchNavigationLinks}">
<Setter Property="SelectedIndex" Value="0"></Setter>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" IsItemsHost="True"></WrapPanel>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<Setter Property="ItemContainerStyle">
<Setter.Value>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"></Setter>
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
<Setter Property="VerticalContentAlignment" Value="Bottom"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="components:TransformationHelper.TransformWhenPressed" Value="True"></Setter>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="FontWeight" Value="Normal"></Setter>
<Setter Property="Margin" Value="0 0 10 0"></Setter>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="MinHeight" Value="40"></Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="IsEnabled" Value="true"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true" IsEnabled="{TemplateBinding IsEnabled}">
<components:Ripple CornerRadius="5" RippleBrush="{StaticResource TangoRippleDarkBrush}">
<StackPanel Orientation="Horizontal">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
<Rectangle HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="20 0 10 0" Height="25" StrokeThickness="1" Stroke="{StaticResource TangoDividerBrush}">
<Rectangle.Style>
<Style TargetType="Rectangle">
<Setter Property="Visibility" Value="Visible"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Converter={StaticResource LastItemInContainerToBooleanConverter}}" Value="True">
<Setter Property="Visibility" Value="Collapsed"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</Rectangle.Style>
</Rectangle>
</StackPanel>
</components:Ripple>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
<Setter Property="FontWeight" Value="Bold"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ItemsControl}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
<StackPanel>
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Stretch"/>
<Line x:Name="PART_Rectangle" X1="0" X2="0" Y1="0" Y2="0" Margin="0 5 0 -3" Stroke="{StaticResource TangoPrimaryAccentBrush}" StrokeThickness="{Binding RelativeSource={RelativeSource AncestorType=local:TouchNavigationLinks},Path=LineThickness}" HorizontalAlignment="Stretch"></Line>
</StackPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|