-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
53 lines (47 loc) · 2.55 KB
/
MainWindow.xaml
File metadata and controls
53 lines (47 loc) · 2.55 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="EmbeddedRecordCreator.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:EmbeddedRecordCreator"
xmlns:model="clr-namespace:EmbeddedRecordCreator.Model"
xmlns:System="clr-namespace:System;assembly=System.Runtime"
mc:Ignorable="d"
Title="EmbeddedRecordCreator" Height="450" Width="800">
<Window.DataContext>
<local:MainWindowViewModel />
</Window.DataContext>
<Window.Resources>
<ObjectDataProvider x:Key="enumValues"
MethodName="GetValues" ObjectType="{x:Type System:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="model:EventType" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Button Command="{Binding ImportCommand}">Import</Button>
<Button Command="{Binding ExportCommand}">Export</Button>
</StackPanel>
<StackPanel Orientation="Horizontal">
<RadioButton IsChecked="{Binding ImportOverwrite, Mode=TwoWay}">Overwrite</RadioButton>
<RadioButton>Append</RadioButton>
</StackPanel>
</StackPanel>
<DataGrid Grid.Row="1" AutoGenerateColumns="False" ItemsSource="{Binding Path=Records}">
<DataGrid.Columns>
<DataGridTextColumn Header="Time (ms)" Binding="{Binding Time, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<DataGridComboBoxColumn Header="Type" ItemsSource="{Binding Source={StaticResource enumValues}, Mode=OneTime}"
TextBinding="{Binding Evnt.Type, UpdateSourceTrigger=PropertyChanged}" />
<DataGridTextColumn Header="Payload" Binding="{Binding Evnt.Payl, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<DataGridCheckBoxColumn Header="Broadcast" Binding="{Binding Evnt.Broad, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</DataGrid.Columns>
</DataGrid>
</Grid>
</Window>