Add project files.

This commit is contained in:
dan_c
2024-01-04 17:32:36 +00:00
parent 6358cf9567
commit da8af59391
48 changed files with 1710 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<Page
x:Class="Hyperbar.Desktop.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,8 @@
using Microsoft.UI.Xaml.Controls;
namespace Hyperbar.Desktop;
public sealed partial class CommandView : Page
{
public CommandView() => InitializeComponent();
}
@@ -0,0 +1,21 @@
namespace Hyperbar.Desktop;
public partial class CommandViewModel :
ObservableCollectionViewModel,
ITemplatedViewModel
{
public CommandViewModel(ITemplateFactory templateFactory)
{
TemplateFactory = templateFactory;
this.Add(new ContextualCommandViewModel(templateFactory));
this.Add(new ContextualCommandViewModel(templateFactory));
this.Add(new ContextualCommandViewModel(templateFactory));
this.Add(new ContextualCommandViewModel(templateFactory));
this.Add(new ContextualCommandViewModel(templateFactory));
var d = Items;
}
public ITemplateFactory TemplateFactory { get; }
}
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<Page
x:Class="Hyperbar.Desktop.ContextualCommandView"
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:local="using:Hyperbar.Desktop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
mc:Ignorable="d">
<Grid>
<Button />
</Grid>
</Page>
@@ -0,0 +1,8 @@
using Microsoft.UI.Xaml.Controls;
namespace Hyperbar.Desktop;
public sealed partial class ContextualCommandView : Page
{
public ContextualCommandView() => InitializeComponent();
}
@@ -0,0 +1,12 @@
namespace Hyperbar.Desktop;
public class ContextualCommandViewModel :
ITemplatedViewModel
{
public ContextualCommandViewModel(ITemplateFactory templateFactory)
{
TemplateFactory = templateFactory;
}
public ITemplateFactory TemplateFactory { get; }
}