/
Dictionary.xaml
117 lines (100 loc) · 5.52 KB
/
Dictionary.xaml
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:ek="clr-namespace:EmptyKeys.UserInterface.Designer;assembly=EmptyKeys.UserInterface.Designer"
xmlns:data="clr-namespace:GameData;assembly=GameData" >
<system:String x:Key="TitleResource">Basic UI Example</system:String>
<BitmapImage x:Key="Image" UriSource="Images/MonoGameLogo.png" />
<Style x:Key="buttonStyle" BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
<Setter Property="Background" Value="DarkOrange"/>
</Style>
<Style x:Key="buttonAnimStyle" BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
<Setter Property="Width" Value="200" />
<Setter Property="Margin" Value="0,1,0,1" />
<Setter Property="SnapsToDevicePixels" Value="False" />
<Style.Triggers>
<EventTrigger RoutedEvent="Button.MouseEnter">
<BeginStoryboard>
<Storyboard>
<ThicknessAnimation
Storyboard.TargetProperty="Margin"
From="0,1,0,1" To="0,5,0,5" Duration="0:0:0.5">
<ThicknessAnimation.EasingFunction>
<SineEase />
</ThicknessAnimation.EasingFunction>
</ThicknessAnimation>
<DoubleAnimation
Storyboard.TargetProperty="Width"
To="220" Duration="0:0:0.5">
<DoubleAnimation.EasingFunction>
<SineEase />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="Button.MouseLeave">
<BeginStoryboard>
<Storyboard>
<ThicknessAnimation
Storyboard.TargetProperty="Margin"
From="0,5,0,5" To="0,1,0,1" Duration="0:0:0.5">
<ThicknessAnimation.EasingFunction>
<SineEase />
</ThicknessAnimation.EasingFunction>
</ThicknessAnimation>
<DoubleAnimation
Storyboard.TargetProperty="Width"
To="200" Duration="0:0:0.5">
<DoubleAnimation.EasingFunction>
<SineEase />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Style.Triggers>
</Style>
<ek:SoundSourceCollection x:Key="Sounds">
<ek:SoundSource SoundType="ButtonsClick" SoundAsset="Click" />
<ek:SoundSource SoundType="TextBoxKeyPress" SoundAsset="KeyPress" />
<ek:SoundSource SoundType="TabControlMove" SoundAsset="Move" />
<ek:SoundSource SoundType="TabControlSelect" SoundAsset="Select" />
</ek:SoundSourceCollection>
<DataTemplate DataType="{x:Type data:TestTreeDataItem}">
<TextBlock Text="{Binding Name}" Margin="2" />
</DataTemplate>
<ControlTemplate x:Key="CustomWindowTemplate">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="20"/>
<RowDefinition />
</Grid.RowDefinitions>
<Border Name="PART_WindowTitleBorder" Background="White"/>
<ContentPresenter Grid.Row="1" Content="{Binding}" />
</Grid>
</ControlTemplate>
<DataTemplate DataType="{x:Type data:CustomWindow}">
<Border Background="Blue" BorderThickness="2" BorderBrush="Gray">
<StackPanel>
<TextBlock Text="{Binding TextData}" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBlock Text="{Binding ManualBinding}" HorizontalAlignment="Center" VerticalAlignment="Center" ek:GeneratedBindings.Mode="Manual" />
<Button Content="Hide Window ddddddddddddddddddddddddddddddddddddddddddddddd" Command="{Binding HideCommand}" />
<Border Name="PART_WindowResizeBorder" Height="15" Width="100" Background="Green" />
</StackPanel>
</Border>
</DataTemplate>
<DataTemplate DataType="{x:Type data:DragDropItem}">
<TextBlock Margin="5" Text="{Binding Name}" />
</DataTemplate>
<Style x:Key="TetrisBorderStyle" TargetType="{x:Type Border}">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Background" Value="{DynamicResource TetrisWindowBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TetrisBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Opacity" Value="0.9" />
</Style>
<SolidColorBrush x:Key="TetrisWindowBackground" Color="Black" />
<SolidColorBrush x:Key="TetrisForeground" Color="White" />
<SolidColorBrush x:Key="TetrisBorderBrush" Color="#FF72B0DA" />
</ResourceDictionary>