-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainWindow.xaml
45 lines (45 loc) · 2.26 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
<Window x:Class="StreamingAssistantAudioGrabberSample.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:StreamingAssistantAudioGrabberSample"
mc:Ignorable="d"
Title="Audio grabber sample" Height="257" Width="509"
ResizeMode="NoResize">
<Window.DataContext>
<local:MainWindowModelView/>
</Window.DataContext>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" Background="Gray">
<ComboBox Margin="10" MinWidth="160" ItemsSource="{Binding AudioSources}" SelectedItem="{Binding SelectedAudioSource}"/>
<TextBlock Foreground="White" VerticalAlignment="Center" Text="{Binding Status}"/>
</WrapPanel>
<WrapPanel Grid.Row="1" Background="Gray">
<CheckBox Margin="10" VerticalAlignment="Center" IsChecked="{Binding OnlyAxisDevices, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<TextBlock Foreground="White" VerticalAlignment="Center" Text="Only show Axis devices"/>
</CheckBox>
</WrapPanel>
<Grid Grid.Row="2">
<Grid.RowDefinitions>
<RowDefinition Height="36"/>
<RowDefinition Height="36"/>
<RowDefinition Height="36"/>
</Grid.RowDefinitions>
<WrapPanel Margin="10" Grid.Row="0">
<TextBlock VerticalAlignment="Center" Text="{Binding SampleTime, StringFormat='Time: {0}'}"/>
</WrapPanel>
<WrapPanel Margin="10" Grid.Row="1">
<TextBlock VerticalAlignment="Center" Text="{Binding PacketCount, StringFormat='Packet count: {0}'}"/>
</WrapPanel>
<WrapPanel Margin="10" Grid.Row="2">
<TextBlock VerticalAlignment="Center" Text="{Binding AudioLevelPercent, StringFormat='Audio level: {0}'}"/>
</WrapPanel>
</Grid>
</Grid>
</Window>