Rename projects to better structure it. The aim is to try and keep it not dependant on the type of UI framework it uses thus allowing us to switch to another UI framework if we need later...

This commit is contained in:
TheXamlGuy
2024-01-06 08:49:12 +00:00
parent b380f06fbf
commit 3e88950669
67 changed files with 211 additions and 196 deletions
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<Page
x:Class="Hyperbar.Windows.CommandView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ItemsControl ItemTemplateSelector="{Binding TemplateFactory}" ItemsSource="{Binding}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</Page>
@@ -0,0 +1,14 @@
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Input;
namespace Hyperbar.Windows;
public sealed partial class CommandView : Page
{
public CommandView() => InitializeComponent();
protected override void OnKeyDown(KeyRoutedEventArgs e)
{
base.OnKeyDown(e);
}
}
@@ -0,0 +1,19 @@
using Hyperbar.Lifecycles;
using Hyperbar.Templates;
using System.Collections.Generic;
namespace Hyperbar.Windows;
public partial class CommandViewModel :
ObservableCollectionViewModel,
ITemplatedViewModel
{
public CommandViewModel(ITemplateFactory templateFactory,
IEnumerable<ICommandWidgetViewModel> commands)
{
TemplateFactory = templateFactory;
AddRange(commands);
}
public ITemplateFactory TemplateFactory { get; }
}