Make custom widgets independent of any WinUI framework concerns. Although one can add WinUI concerns to ther widget if they want to build a fully customized widget. In theory, it may also be possible to host a widget of WPF, Avalonia, or Blazor.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Page
|
||||
<UserControl
|
||||
x:Class="Hyperbar.Windows.CommandView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
@@ -10,4 +10,4 @@
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
</Page>
|
||||
</UserControl>
|
||||
|
||||
@@ -3,7 +3,8 @@ using Microsoft.UI.Xaml.Input;
|
||||
|
||||
namespace Hyperbar.Windows;
|
||||
|
||||
public sealed partial class CommandView : Page
|
||||
public sealed partial class CommandView :
|
||||
UserControl
|
||||
{
|
||||
public CommandView() => InitializeComponent();
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ public partial class CommandViewModel :
|
||||
ITemplatedViewModel
|
||||
{
|
||||
public CommandViewModel(ITemplateFactory templateFactory,
|
||||
IEnumerable<ICommandWidgetViewModel> commands)
|
||||
IEnumerable<IWidgetViewModel> commands)
|
||||
{
|
||||
TemplateFactory = templateFactory;
|
||||
AddRange(commands);
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UserControl
|
||||
x:Class="Hyperbar.Windows.WidgetView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Grid />
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Hyperbar.Windows;
|
||||
|
||||
public sealed partial class WidgetView :
|
||||
UserControl,
|
||||
IWidgetView
|
||||
{
|
||||
public WidgetView() => InitializeComponent();
|
||||
}
|
||||
Reference in New Issue
Block a user