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:
TheXamlGuy
2024-01-06 09:57:23 +00:00
parent 3e88950669
commit 4a27534e39
41 changed files with 218 additions and 205 deletions
+2 -2
View File
@@ -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>
+2 -1
View File
@@ -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();
+1 -1
View File
@@ -9,7 +9,7 @@ public partial class CommandViewModel :
ITemplatedViewModel
{
public CommandViewModel(ITemplateFactory templateFactory,
IEnumerable<ICommandWidgetViewModel> commands)
IEnumerable<IWidgetViewModel> commands)
{
TemplateFactory = templateFactory;
AddRange(commands);
+7
View File
@@ -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>
+10
View File
@@ -0,0 +1,10 @@
using Microsoft.UI.Xaml.Controls;
namespace Hyperbar.Windows;
public sealed partial class WidgetView :
UserControl,
IWidgetView
{
public WidgetView() => InitializeComponent();
}