-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.axaml
More file actions
79 lines (67 loc) · 3.11 KB
/
Copy pathMainWindow.axaml
File metadata and controls
79 lines (67 loc) · 3.11 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
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
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="SerialVolumeControl.MainWindow"
Title="SerialVolumeControl"
Width="700" Height="400"
MinWidth="500" MinHeight="350">
<Window.Styles>
<Style Selector="ComboBox">
<Setter Property="FontSize" Value="14"/>
<Setter Property="Padding" Value="6,4"/>
</Style>
<Style Selector="Slider">
<Setter Property="Height" Value="24"/>
<Setter Property="Margin" Value="10,0,0,4"/>
</Style>
</Window.Styles>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!-- Top controls: COM port and connect/disconnect -->
<StackPanel Orientation="Horizontal" Spacing="10" Grid.Row="0" Grid.ColumnSpan="2">
<ComboBox Name="PortComboBox" Width="150" />
<Button Name="ConnectButton" Content="Connect" Width="100" />
<Button Name="DisconnectButton" Content="Disconnect" IsEnabled="False" Width="100" />
</StackPanel>
<!-- Theme -->
<StackPanel Orientation="Horizontal" Spacing="10" Grid.Row="1" Grid.ColumnSpan="2" VerticalAlignment="Center">
<ToggleButton Name="ThemeToggleButton" Content="Light / Dark Mode" Width="140"/>
</StackPanel>
<!-- Volume Controls Grid -->
<Grid Grid.Row="2" Grid.ColumnSpan="2" Name="VolumeControlsGrid">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="220"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Repeat for each app combo + slider -->
<ComboBox Name="AppComboBox1" Width="200" Grid.Row="0" Grid.Column="0" Margin="0,4"/>
<Slider Name="VolumeSlider1" Minimum="0" Maximum="100" Grid.Row="0" Grid.Column="1" Margin="10,10"/>
<ComboBox Name="AppComboBox2" Width="200" Grid.Row="1" Grid.Column="0" Margin="0,4"/>
<Slider Name="VolumeSlider2" Minimum="0" Maximum="100" Grid.Row="1" Grid.Column="1" Margin="10,10"/>
<ComboBox Name="AppComboBox3" Width="200" Grid.Row="2" Grid.Column="0" Margin="0,4"/>
<Slider Name="VolumeSlider3" Minimum="0" Maximum="100" Grid.Row="2" Grid.Column="1" Margin="10,10"/>
<ComboBox Name="AppComboBox4" Width="200" Grid.Row="3" Grid.Column="0" Margin="0,4"/>
<Slider Name="VolumeSlider4" Minimum="0" Maximum="100" Grid.Row="3" Grid.Column="1" Margin="10,10"/>
<ComboBox Name="AppComboBox5" Width="200" Grid.Row="4" Grid.Column="0" Margin="0,4"/>
<Slider Name="VolumeSlider5" Minimum="0" Maximum="100" Grid.Row="4" Grid.Column="1" Margin="10,10"/>
</Grid>
<!-- Footer: Optional for status or instructions -->
<TextBlock Grid.Row="3" Grid.ColumnSpan="2" Margin="0,10,0,0" FontStyle="Italic" FontSize="12"
Text="Made by Alberto van Eckeveld."/>
</Grid>
</Window>