-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
53 lines (53 loc) · 2.51 KB
/
MainWindow.xaml
File metadata and controls
53 lines (53 loc) · 2.51 KB
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
<Window x:Class="KD.Plugins.MobiscriptEditor.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:props="clr-namespace:KD.Plugins.MobiscriptEditor.Properties"
xmlns:icsc="http://icsharpcode.net/sharpdevelop/avalonedit"
mc:Ignorable="d"
Name="mainWindow"
WindowStyle="ToolWindow"
WindowStartupLocation="CenterOwner"
ShowInTaskbar="False"
Title="{x:Static props:Resources.MainWindowTitle}"
Height="420" Width="740"
PreviewMouseWheel="mainWindow_PreviewMouseWheel"
SizeChanged="mainWindow_SizeChanged"
LocationChanged="mainWindow_LocationChanged">
<Window.Resources>
<Style TargetType="Button">
<Setter Property="Content" Value="{Binding Command.Text, RelativeSource={RelativeSource Self}}"/>
<Setter Property="Margin" Value="4"/>
<Setter Property="Padding" Value="3"/>
</Style>
</Window.Resources>
<Window.CommandBindings>
<CommandBinding Command="ApplicationCommands.Save" Executed="Save_Executed"/>
<CommandBinding Command="ApplicationCommands.Close" Executed="Close_Executed"/>
</Window.CommandBindings>
<Window.InputBindings>
<KeyBinding Command="ApplicationCommands.Save" Key="Return" Modifiers="Ctrl"/>
<KeyBinding Command="ApplicationCommands.Close" Key="Esc"/>
</Window.InputBindings>
<Grid FocusManager.FocusedElement="{Binding ElementName=textEditor}">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<icsc:TextEditor Name="textEditor"
FontFamily="Consolas"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"/>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Right"
Grid.Row="1">
<Button Command="ApplicationCommands.Save"
Content="{x:Static props:Resources.OkButtonTitle}"
IsDefault="True"/>
<Button Command="ApplicationCommands.Close"
Content="{x:Static props:Resources.CancelButtonTitle}"
IsCancel="True"/>
</StackPanel>
</Grid>
</Window>