Bunch of insane work

This commit is contained in:
TheXamlGuy
2024-02-08 22:16:58 +00:00
parent 28d79f77d0
commit 2aeb4d1b54
58 changed files with 547 additions and 326 deletions
+16
View File
@@ -1,11 +1,17 @@
using Hyperbar.Interop.Windows;
using Microsoft.UI.Windowing;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Windows.Graphics;
using WinRT.Interop;
namespace Hyperbar.UI.Windows;
public class NavigationItemTemplateSelector :
DataTemplateSelector
{
}
public static class WindowExtensions
{
public static WindowMessageListener CreateMessageListener(this Window window) =>
@@ -36,6 +42,16 @@ public static class WindowExtensions
public static void SetStyle(this Window window,
ExtendedWindowStyle style) => window.GetHandle().SetExtendedWindowStyle(style);
public static void TitleBarConfiguration(this Window window,
Action<AppWindowTitleBar> titleBarDelegate)
{
AppWindow appWindow = window.AppWindow;
if (appWindow.TitleBar is AppWindowTitleBar titleBar)
{
titleBarDelegate.Invoke(titleBar);
}
}
public static void SetTopMost(this Window window,
bool value)
{