79742509

Date: 2025-08-21 15:38:17
Score: 2
Natty:
Report link

Good afternoon, I would suggest the following option:

Set the BackgroundColor property in the AppShell.xaml file:

<?xml version="1.0" encoding="UTF-8" ?>
<Shell
    x:Class="MauiAppTestTheme.AppShell"
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:local="clr-namespace:MauiAppTestTheme"
    Title="MauiAppTestTheme"
    **Shell.BackgroundColor="{AppThemeBinding Light={StaticResource Black}, Dark=  {StaticResource Black}}">**

    <ShellContent
        Title="Home"
        ContentTemplate="{DataTemplate local:MainPage}"
        Route="MainPage" />

</Shell>

This will allow you to always use the dark theme on every page of the app by default

enter image description here

Reasons:
  • Blacklisted phrase (1): Good afternoon
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Артур Дементьев