HeadMeld 0.0.0.1
- Working MVVM implementation - Refactored code
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<Window x:Class="HeadMeld.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:ui="http://schemas.modernwpf.com/2019"
|
||||
ui:WindowHelper.UseModernWindowStyle="True"
|
||||
mc:Ignorable="d" Height="450" Width="300"
|
||||
ResizeMode="NoResize" ShowInTaskbar="False">
|
||||
<Grid>
|
||||
<!-- Window Stack Panel-->
|
||||
<ui:SimpleStackPanel
|
||||
Margin="12" Spacing="20"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto" >
|
||||
|
||||
<!-- Window Header-->
|
||||
<TextBlock Text="🎧HeadMeld"
|
||||
Style="{StaticResource HeaderTextBlockStyle}" />
|
||||
|
||||
<!-- Equalizer APO Status -->
|
||||
<ui:NavigationViewItemHeader Content="Equalizer APO Status"/>
|
||||
<ui:ToggleSwitch x:Name="ToggleAPOEnabled"
|
||||
Margin="15,-15,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
OffContent="Disabled" OnContent="Enabled"
|
||||
IsOn="{Binding ToggleAPOEnabled,
|
||||
UpdateSourceTrigger=PropertyChanged}"/>
|
||||
|
||||
<!-- Selected Profile-->
|
||||
<ui:NavigationViewItemHeader Content="Selected Profile"/>
|
||||
<ui:RadioButtons x:Name="btnRadioProfiles"
|
||||
Margin="15,-15,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
ItemsSource="{Binding Profiles,
|
||||
UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<!-- Window Controls -->
|
||||
<Button x:Name="btnExit"
|
||||
Margin="15,0,15,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Content="Exit" />
|
||||
</ui:SimpleStackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,21 @@
|
||||
using System.Windows;
|
||||
using HeadMeld.ViewModels;
|
||||
|
||||
namespace HeadMeld
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
private readonly MainWindowViewModel viewModel;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
viewModel = new MainWindowViewModel();
|
||||
DataContext = viewModel;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user