blob: 8458b4cab776d0e7e7e3b648b65df3b8bbf99adc (
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
|
<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.Keyboard">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/Colors.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type local:KeyboardView}">
<Setter Property="Focusable" Value="True"></Setter>
<Setter Property="Background" Value="{StaticResource TangoKeyboardBackground}"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:KeyboardView}">
<Grid>
<Grid>
<Grid x:Name="PART_GridContent">
<ContentPresenter x:Name="PART_ContentPresenter" Content="{TemplateBinding View}"></ContentPresenter>
</Grid>
<Grid Focusable="True" VerticalAlignment="Bottom" Background="{TemplateBinding Background}">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="MaxHeight" Value="0"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=local:KeyboardView},Path=IsOpened}" Value="True">
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="MaxHeight" To="600" Duration="00:00:0.2"></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
<DataTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="MaxHeight" To="0" Duration="00:00:0.2"></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</DataTrigger.ExitActions>
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<Border BorderThickness="0 1 0 0" BorderBrush="#404040">
<local:TouchKeyboard x:Name="PART_Keyboard" OutputMode="{TemplateBinding OutputMode}"></local:TouchKeyboard>
</Border>
</Grid>
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|