-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainWindow.xaml
97 lines (96 loc) · 4.6 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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<Window x:Class="RemoteController.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"
mc:Ignorable="d"
xmlns:model="clr-namespace:RemoteController.Model"
Height="450"
Icon="{StaticResource AppIconDark}"
Width="800">
<TabControl>
<TabItem Header="Reciever"
DataContext="{Binding Receiver}">
<DockPanel>
<StackPanel Orientation="Horizontal"
Margin="5"
DockPanel.Dock="Top">
<ComboBox x:Name="DeviceTypeCombo"
VerticalAlignment="Center"
SelectedIndex="0"
Margin="5,0" />
<Button Content="Start"
Padding="5"
Command="{Binding Start}"
CommandParameter="{Binding ElementName=DeviceTypeCombo, Path=SelectedItem}"/>
<Button Content="Stop"
Margin="5,0"
Padding="5"
Command="{Binding Stop}" />
</StackPanel>
<ListView x:Name="DeviceListView"
ItemsSource="{Binding Screens}"
SelectionMode="Single"
Padding="5">
<ItemsControl.ItemTemplate>
<DataTemplate>
<GroupBox Margin="5"
Header="{Binding Name}">
<ItemsControl ItemsSource="{Binding Displays}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Padding="40,30"
Margin="5"
Background="{DynamicResource {x:Static SystemColors.GradientActiveCaptionBrushKey}}">
<TextBlock Text="{Binding}" />
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</GroupBox>
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ListView>
</DockPanel>
</TabItem>
<TabItem Header="Sender"
DataContext="{Binding Sender}">
<DockPanel>
<StackPanel Orientation="Horizontal"
Margin="5"
DockPanel.Dock="Top">
<Button Content="Pick"
Padding="5"
Command="{Binding Pick}" />
</StackPanel>
<StackPanel Margin="5"
DockPanel.Dock="Bottom"
HorizontalAlignment="Right">
<Button Content="{Binding State}"
Command="{Binding Connect}"
DockPanel.Dock="Top"
HorizontalAlignment="Right"
Padding="5" />
</StackPanel>
<ListView ItemsSource="{Binding Devices}"
SelectedItem="{Binding SelectedDevice, Mode=TwoWay}">
<ListView.ItemTemplate>
<DataTemplate DataType="{x:Type model:Device}">
<Label Content="{Binding}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</DockPanel>
</TabItem>
</TabControl>
</Window>