tidy up
This commit is contained in:
@@ -52,6 +52,7 @@ public partial class App :
|
||||
services.AddContentTemplate<SecondaryViewModel, SecondaryView>();
|
||||
|
||||
services.AddContentTemplate<SettingsButtonViewModel, SettingsButtonView>();
|
||||
services.AddContentTemplate<SettingsView, SettingsView>("Settings");
|
||||
|
||||
services.AddTransient<IInitializer, AppInitializer>();
|
||||
})
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<ItemsControl
|
||||
Margin="6,0,6,0"
|
||||
ItemTemplateSelector="{Binding Converter={windows:DataTemplateConverter}}"
|
||||
ItemsSource="{Binding}">
|
||||
ItemsSource="{x:Bind ViewModel, Mode=OneWay}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<Grid>
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
using Hyperbar.Widget;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Hyperbar.Windows;
|
||||
|
||||
public sealed partial class ApplicationBarView :
|
||||
public partial class ApplicationBarView :
|
||||
UserControl
|
||||
{
|
||||
public ApplicationBarView() => InitializeComponent();
|
||||
public ApplicationBarView() =>
|
||||
InitializeComponent();
|
||||
protected ApplicationBarViewModel ViewModel =>
|
||||
(ApplicationBarViewModel)DataContext;
|
||||
}
|
||||
@@ -18,6 +18,7 @@
|
||||
<None Remove="PrimaryView.xaml" />
|
||||
<None Remove="SecondaryView.xaml" />
|
||||
<None Remove="SettingsButtonView.xaml" />
|
||||
<None Remove="SettingsView.xaml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\SplashScreen.scale-200.png" />
|
||||
@@ -54,6 +55,11 @@
|
||||
<ProjectReference Include="..\Hyperbar.Widget\Hyperbar.Widget.csproj" />
|
||||
<ProjectReference Include="..\Hyperbar\Hyperbar.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Update="SettingsView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Update="SettingsButtonView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<ItemsControl
|
||||
HorizontalAlignment="Center"
|
||||
ItemTemplateSelector="{Binding Converter={windows:DataTemplateConverter}}"
|
||||
ItemsSource="{Binding}">
|
||||
ItemsSource="{x:Bind ViewModel}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<ItemsStackPanel Orientation="Horizontal" />
|
||||
|
||||
@@ -1,28 +1,14 @@
|
||||
using Microsoft.UI.Xaml;
|
||||
using Hyperbar.Widget;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Controls.Primitives;
|
||||
using Microsoft.UI.Xaml.Data;
|
||||
using Microsoft.UI.Xaml.Input;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using Microsoft.UI.Xaml.Navigation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
|
||||
// To learn more about WinUI, the WinUI project structure,
|
||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||
namespace Hyperbar.Windows;
|
||||
|
||||
namespace Hyperbar.Windows
|
||||
public partial class PrimaryView :
|
||||
UserControl
|
||||
{
|
||||
public sealed partial class PrimaryView : UserControl
|
||||
{
|
||||
public PrimaryView()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
}
|
||||
public PrimaryView() =>
|
||||
InitializeComponent();
|
||||
|
||||
protected PrimaryViewModel ViewModel =>
|
||||
(PrimaryViewModel)DataContext;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:windows="using:Hyperbar.UI.Windows">
|
||||
<Grid>
|
||||
<ItemsControl ItemTemplateSelector="{Binding Converter={windows:DataTemplateConverter}}" ItemsSource="{Binding}">
|
||||
<ItemsControl ItemTemplateSelector="{Binding Converter={windows:DataTemplateConverter}}" ItemsSource="{x:Bind ViewModel, Mode=OneWay}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<ItemsStackPanel Orientation="Horizontal" />
|
||||
|
||||
@@ -1,28 +1,14 @@
|
||||
using Microsoft.UI.Xaml;
|
||||
using Hyperbar.Widget;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Controls.Primitives;
|
||||
using Microsoft.UI.Xaml.Data;
|
||||
using Microsoft.UI.Xaml.Input;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using Microsoft.UI.Xaml.Navigation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
|
||||
// To learn more about WinUI, the WinUI project structure,
|
||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||
namespace Hyperbar.Windows;
|
||||
|
||||
namespace Hyperbar.Windows
|
||||
public partial class SecondaryView :
|
||||
UserControl
|
||||
{
|
||||
public sealed partial class SecondaryView : UserControl
|
||||
{
|
||||
public SecondaryView()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
}
|
||||
public SecondaryView() =>
|
||||
InitializeComponent();
|
||||
|
||||
protected SecondaryViewModel ViewModel =>
|
||||
(SecondaryViewModel)DataContext;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UserControl
|
||||
x:Class="Hyperbar.Windows.SettingsView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Grid />
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Hyperbar.Windows
|
||||
{
|
||||
public sealed partial class SettingsView :
|
||||
UserControl
|
||||
{
|
||||
public SettingsView() =>
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hyperbar.Windows
|
||||
{
|
||||
internal class SettingsViewModel
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user