Hello,
Avoid posting multiple questions in a single thread in Q&A
Let's focus on the first issue, you can open new threads for other issues.
How to change the color of title bar (to no be accent from user for example I want this title bar to be black.)
You can get the titlebar in the following ConfigureLifecycleEvents
, then set the background color to black for titlebar, three button's background and the inactive status.
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureLifecycleEvents(events =>
{
#if WINDOWS
events.AddWindows(windowsLifecycleBuilder =>
{
windowsLifecycleBuilder.OnWindowCreated(window =>
{
var handle = WinRT.Interop.WindowNative.GetWindowHandle(window);
var id = Microsoft.UI.Win32Interop.GetWindowIdFromWindow(handle);
var appWindow = Microsoft.UI.Windowing.AppWindow.GetFromWindowId(id);
var titleBar = appWindow.TitleBar;
titleBar.BackgroundColor = Colors.Black.ToWindowsColor();
titleBar.ButtonBackgroundColor = Colors.Black.ToWindowsColor();
titleBar.InactiveBackgroundColor = Colors.Black.ToWindowsColor();
titleBar.ButtonInactiveBackgroundColor = Colors.Black.ToWindowsColor();
});
#endif
});
})
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.