blob: 093eea083966f9e5b3dbf8731095833c4fb76bfb (
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
|
<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">
<Style TargetType="{x:Type local:KeyboardView}">
<Setter Property="Focusable" Value="True"></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>
<local:TouchKeyboard x:Name="PART_Keyboard"></local:TouchKeyboard>
</Grid>
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|