-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
32 lines (32 loc) · 1.65 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
31
32
<Window x:Class="LetterClassifier.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:LetterClassifier"
mc:Ignorable="d"
Title="Letter Classifier" Height="450" Width="800">
<Window.DataContext>
<local:MainViewModel />
</Window.DataContext>
<Window.Resources>
<local:PathToImageSourceConverter x:Key="PathToImageSourceConverter" />
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Menu>
<MenuItem Header="File">
<MenuItem Header="Load Classifications" Command="{Binding Path=LoadClassificationsCommand}" />
<MenuItem Header="Save Classifications" Command="{Binding Path=SaveClassificationsCommand}" />
</MenuItem>
</Menu>
<Image Grid.Row="1" Source="{Binding Path=ImagePath.Value, Converter={StaticResource PathToImageSourceConverter}}" />
<TextBox Grid.Row="2" Text="{Binding Path=Letter.Value, UpdateSourceTrigger=PropertyChanged}" FontSize="18" HorizontalContentAlignment="Center" />
<Button Grid.Row="3" Command="{Binding Path=LabelImageCommand}" IsDefault="True" FontSize="18">Label</Button>
</Grid>
</Window>