SLVZ.MAUI.SystemUI
1.0.4
See the version list below for details.
dotnet add package SLVZ.MAUI.SystemUI --version 1.0.4
NuGet\Install-Package SLVZ.MAUI.SystemUI -Version 1.0.4
<PackageReference Include="SLVZ.MAUI.SystemUI" Version="1.0.4" />
<PackageVersion Include="SLVZ.MAUI.SystemUI" Version="1.0.4" />
<PackageReference Include="SLVZ.MAUI.SystemUI" />
paket add SLVZ.MAUI.SystemUI --version 1.0.4
#r "nuget: SLVZ.MAUI.SystemUI, 1.0.4"
#:package SLVZ.MAUI.SystemUI@1.0.4
#addin nuget:?package=SLVZ.MAUI.SystemUI&version=1.0.4
#tool nuget:?package=SLVZ.MAUI.SystemUI&version=1.0.4
SLVZ.MAUI.SystemUI
That does this package do
- Handle Edge-to-Edge in Android
- Handle Back-Button-Press in Android
- Theme helper
- Change status bar and navigation bar color
1. Edge-to-Edge handler
Native application
Set the shell directly in AppShell.cs inside AppShell():
public AppShell()
{
InitializeComponent();
Edge2EdgeHandler.SetShell(this);
}
Done ✅
If you want to build a fullscreen app you can do that 😃
public AppShell()
{
InitializeComponent();
Edge2EdgeHandler.SetShell(this, false);
}
Then you can have Statusbar height and Navigationbar height at the same time to handle them by yourself
int navHeight = Edge2EdgeHandler.NavbarHeight;
int statusHeight = Edge2EdgeHandler.StatusbarHeight;
Hybrid blazor application
Set the page directly in MainPage.cs inside MainPage():
public MainPage()
{
InitializeComponent();
Edge2EdgeHandler.SetPage(this);
}
Done ✅
You can also use this method in native application and set every page that laoded
If you want to build a fullscreen app you can do that 😃
public AppShell()
{
InitializeComponent();
Edge2EdgeHandler.SetShell(this, false);
}
Then you can have Statusbar height and Navigationbar height at the same time to handle them by yourself
int navHeight = Edge2EdgeHandler.NavbarHeight;
int statusHeight = Edge2EdgeHandler.StatusbarHeight;
2. Back press handler
In Android 16 and up the public override void OnBackPressed() function does not work.
How to use?
You can use handler wherever you want
BackPressHandler.OnBackPressed += (o,e) =>
{
//Do something
};
Done ✅
3. Theme helper
Get native system default theme
var theme = ThemeHelper.SystemTheme;
This will return an UITheme variable
Set status bar and navigation bar color for Android
They only require a MAUI Color
ThemeHelper.SetStatusBarColor(color);
ThemeHelper.SetNavigationBarColor(color);
👨💻 Author: SLVZ
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-android36.0 is compatible. net10.0-windows10.0.19041 is compatible. |
-
net10.0-android36.0
- Microsoft.Maui.Controls (>= 10.0.20)
-
net10.0-windows10.0.19041
- Microsoft.Maui.Controls (>= 10.0.20)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.