-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGestureTile.axaml
51 lines (44 loc) · 2.02 KB
/
GestureTile.axaml
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
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:TouchGestures.UX.Controls">
<Design.PreviewWith>
<Grid>
<controls:GestureTile GestureName="Swipe" Description="A gesture completed by swiping in a specific direction"
Width="264" Height="264" Icon="Assets/Setups/Swipe/swipe_up.png"/>
</Grid>
</Design.PreviewWith>
<Style Selector="controls|GestureTile /template/ Button">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="BorderBrush" Value="{StaticResource BorderColorBrush}" />
<Setter Property="Background" Value="{StaticResource AccentColorBrush}" />
<Setter Property="CornerRadius" Value="5" />
<Setter Property="BorderThickness" Value="2" />
<Setter Property="Padding" Value="8,32,8,6" />
</Style>
<Style Selector="controls|GestureTile /template/ Button > ContentPresenter">
<Setter Property="Padding" Value="0" />
</Style>
<Style Selector="controls|GestureTile /template/ Image">
<Setter Property="Margin" Value="4, 4, 4, 8" />
</Style>
<Style Selector="controls|GestureTile /template/ TextBlock">
<Setter Property="FontSize" Value="24" />
<Setter Property="Foreground" Value="{StaticResource TextColorBrush}" />
<Setter Property="TextAlignment" Value="Center" />
</Style>
<Style Selector="controls|GestureTile">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Button Command="{TemplateBinding Command}" ToolTip.Tip="{TemplateBinding Description}">
<Grid RowDefinitions="*, Auto">
<Image Source="{TemplateBinding Icon}" Grid.Row="0" RenderOptions.BitmapInterpolationMode="MediumQuality" />
<TextBlock Text="{TemplateBinding GestureName}" Grid.Row="1" />
</Grid>
</Button>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Styles>