blob: db5ba6f3d73f6c85178b01a335beda050f85d1a8 (
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.Keyboard">
<Style TargetType="{x:Type local:KeyboardView}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:KeyboardView}">
<Grid DataContext="{Binding RelativeSource={RelativeSource AncestorType=local:KeyboardView}}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto">
<RowDefinition.Style>
<Style TargetType="RowDefinition">
<Setter Property="MaxHeight" Value="0"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsOpened}" Value="True">
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="MaxHeight" To="1000" Duration="00:00:0.2"></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
<DataTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="MaxHeight" To="0" Duration="00:00:0.1"></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</DataTrigger.ExitActions>
</DataTrigger>
</Style.Triggers>
</Style>
</RowDefinition.Style>
</RowDefinition>
</Grid.RowDefinitions>
<Grid>
<ContentPresenter Content="{Binding View}"></ContentPresenter>
</Grid>
<Grid Grid.Row="1">
<local:TouchKeyboard x:Name="PART_Keyboard" />
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|