-
Notifications
You must be signed in to change notification settings - Fork 1
/
Input.xaml
81 lines (81 loc) · 2.87 KB
/
Input.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
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow"
SizeToContent="WidthAndHeight"
MinWidth = "900"
MinHeight = "150"
FontFamily="Consolas"
FontSize="14"
FocusManager.FocusedElement="{Binding ElementName=Value}"
Topmost="True">
<Window.Resources>
<Style TargetType="Control" x:Key="Margin">
<Setter Property="Margin" Value="5" />
</Style>
<Style TargetType="Button" BasedOn="{StaticResource Margin}">
<Setter Property="Background" Value="LightBlue" />
<Setter Property="Height" Value="30" />
<Setter Property="Width" Value="100" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border
CornerRadius="5"
BorderThickness="1"
Background="{TemplateBinding Background}">
<ContentPresenter
Content="{TemplateBinding Content}"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Cyan" />
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="2*" />
</Grid.RowDefinitions>
<TextBlock Name="Prompt" Grid.ColumnSpan="3" Margin="5" />
<TextBox
Grid.Row="1"
Name="Value"
Style="{StaticResource Margin}"
MaxLines="6"
AcceptsReturn="True"
SpellCheck.IsEnabled="True"
Language="en-US"
Width="600"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"/>
<Button
Name="OK"
Grid.Row="1"
Grid.Column="1">
<AccessText>
_OK
</AccessText>
</Button>
<Button
Name="Cancel"
Grid.Row="1"
Grid.Column="2">
<AccessText>
_Cancel
</AccessText>
</Button>
</Grid>
</Window>