-
Notifications
You must be signed in to change notification settings - Fork 1
/
MainWindow.xaml
30 lines (30 loc) · 1.53 KB
/
MainWindow.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
<Window x:Class="Rot13.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:local="clr-namespace:Rot13"
mc:Ignorable="d"
Title="ROT13" Height="180" Width="320">
<Window.Resources>
<local:Rot13Encoder x:Key="r13"/>
</Window.Resources>
<Grid DataContext="{StaticResource r13}">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<TextBox x:Name="rot13String"
Text="{Binding Path=Text, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
Grid.Row="0" Margin="10,10,10,0"
TextWrapping="Wrap" AcceptsReturn="True"
ScrollViewer.CanContentScroll="True"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Auto" />
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
<Button Content="Encode" Width="75" Command="{Binding Path=Encode}" Margin="10"/>
<Button Content="Copy Rot13" Width="75" Command="{Binding CopyRot13}" Margin="10"/>
<Button Content="Paste Rot13" Width="75" Command="{Binding PasteRot13}" Margin="10"/>
</StackPanel>
</Grid>
</Window>