tasks settings added, app icon added

This commit is contained in:
2024-03-05 01:45:06 +01:00
Unverified
parent 930b13eecc
commit e4c9074465
25 changed files with 267 additions and 40 deletions

View File

@@ -1,3 +1,5 @@
using Microsoft.UI;
using Microsoft.UI.Windowing;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
@@ -39,6 +41,7 @@ namespace VDownload.Core.Views
public BaseWindow(BaseViewModel viewModel)
{
this.InitializeComponent();
this.Activated += BaseWindow_Activated;
this.ExtendsContentIntoTitleBar = true;
this.SetTitleBar(this.AppTitleBar);
@@ -54,6 +57,14 @@ namespace VDownload.Core.Views
private void Root_Loaded(object sender, RoutedEventArgs e) => RootLoaded?.Invoke(this, EventArgs.Empty);
private void BaseWindow_Activated(object sender, WindowActivatedEventArgs args)
{
IntPtr windowHandle = WinRT.Interop.WindowNative.GetWindowHandle(this);
WindowId windowId = Win32Interop.GetWindowIdFromWindow(windowHandle);
AppWindow appWindow = AppWindow.GetFromWindowId(windowId);
appWindow.SetIcon(@"Assets\Logo\Logo.ico");
}
#endregion
}
}