Add project files.
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
Reference in New Issue
Block a user