Compare commits

...

3 Commits

Author SHA1 Message Date
qhy040404
9b1a953947 remove WindowOptions.UseSystemBackdrop 2024-03-08 16:41:28 +08:00
qhy040404
b414ce27e0 code style 2024-03-08 16:33:13 +08:00
qhy040404
ea867916f2 fix #1434 2024-03-08 16:30:00 +08:00
2 changed files with 5 additions and 10 deletions

View File

@@ -69,12 +69,10 @@ internal sealed class WindowController
window.Activate();
options.BringToForeground();
if (options.UseSystemBackdrop)
{
AppOptions appOptions = serviceProvider.GetRequiredService<AppOptions>();
UpdateSystemBackdrop(appOptions.BackdropType);
appOptions.PropertyChanged += OnOptionsPropertyChanged;
}
AppOptions appOptions = serviceProvider.GetRequiredService<AppOptions>();
UpdateElementTheme(appOptions.ElementTheme);
UpdateSystemBackdrop(appOptions.BackdropType);
appOptions.PropertyChanged += OnOptionsPropertyChanged;
subclass.Initialize();

View File

@@ -41,21 +41,18 @@ internal readonly struct WindowOptions
/// </summary>
public readonly bool PersistSize;
public readonly bool UseSystemBackdrop;
/// <summary>
/// 是否使用 Win UI 3 自带的拓展标题栏实现
/// </summary>
public readonly bool UseLegacyDragBarImplementation = !AppWindowTitleBar.IsCustomizationSupported();
public WindowOptions(Window window, FrameworkElement titleBar, SizeInt32 initSize, bool persistSize = false, bool useSystemBackdrop = true)
public WindowOptions(Window window, FrameworkElement titleBar, SizeInt32 initSize, bool persistSize = false)
{
Hwnd = WindowNative.GetWindowHandle(window);
InputNonClientPointerSource = InputNonClientPointerSource.GetForWindowId(window.AppWindow.Id);
TitleBar = titleBar;
InitSize = initSize;
PersistSize = persistSize;
UseSystemBackdrop = useSystemBackdrop;
}
/// <summary>