Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
cd77417
change behaviour for API 30+
Pastajello Apr 6, 2026
86e456f
remove not needed flad for <=API29 add sample project?
Pastajello Apr 6, 2026
3ac122b
remove not needed transparency
Pastajello Apr 7, 2026
2f9aa9d
remove sample
Pastajello Apr 8, 2026
7b0d69c
better sample
Pastajello Apr 9, 2026
6d5a5d9
remove remaining files
Pastajello Apr 9, 2026
5d30f95
Merge branch 'main' into bugfix/2351-content-behind-statusbar
Pastajello Apr 9, 2026
8514bec
PR refactorings
Pastajello Apr 9, 2026
4e80d0d
restore previous page formatting
Pastajello Apr 9, 2026
1235318
remove more formatting changes
Pastajello Apr 9, 2026
7c785b2
Apply suggestion from @TheCodeTraveler
Pastajello Apr 9, 2026
3e55567
fix wrong names
Pastajello Apr 9, 2026
6123950
even more formatting fixes
Pastajello Apr 9, 2026
81c74df
Merge branch 'main' into bugfix/2351-content-behind-statusbar
ne0rrmatrix Apr 12, 2026
5033fa4
Merge branch 'main' into bugfix/2351-content-behind-statusbar
TheCodeTraveler Apr 15, 2026
1d2ebb7
Merge branch 'main' into bugfix/2351-content-behind-statusbar
Pastajello Apr 15, 2026
0b95162
Fix namespaces, better naming + add SafeAreaEdges Default
MerSpyro Apr 15, 2026
c73ae04
revert refactoring
MerSpyro Apr 15, 2026
09f0158
Apply suggestion from @TheCodeTraveler
TheCodeTraveler Apr 15, 2026
2a62ecd
Update samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/StatusBar…
TheCodeTraveler Apr 15, 2026
5d6047c
Update samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/StatusBar…
TheCodeTraveler Apr 15, 2026
73241d4
add flag clearing -copilot suggestion
MerSpyro Apr 15, 2026
517b8f7
Merge branch 'bugfix/2351-content-behind-statusbar' of https://github…
MerSpyro Apr 15, 2026
d81f5f4
Update samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/StatusBar…
Pastajello Apr 15, 2026
9dfebba
remove support android
MerSpyro Apr 15, 2026
4825bac
Merge branch 'bugfix/2351-content-behind-statusbar' of https://github…
MerSpyro Apr 15, 2026
c0984d2
Apply suggestion from @TheCodeTraveler
TheCodeTraveler Apr 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions samples/CommunityToolkit.Maui.Sample.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<Project Path="CommunityToolkit.Maui.Sample/CommunityToolkit.Maui.Sample.csproj">
<Deploy />
</Project>
<Project Path="MauiApp1/MauiApp1.csproj" />
</Folder>
<Folder Name="/Solution Items/">
Comment thread
Pastajello marked this conversation as resolved.
<File Path="../.editorconfig" />
Expand Down
14 changes: 14 additions & 0 deletions samples/MauiApp1/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version = "1.0" encoding = "UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:MauiApp1"
x:Class="MauiApp1.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
14 changes: 14 additions & 0 deletions samples/MauiApp1/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace MauiApp1
{
public partial class App : Application
{
public App()
{
InitializeComponent();

var shell = new AppShell();

MainPage = shell;
}
}
}
32 changes: 32 additions & 0 deletions samples/MauiApp1/AppShell.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="MauiApp1.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:MauiApp1"
xmlns:xct="clr-namespace:CommunityToolkit.Maui.Behaviors;assembly=CommunityToolkit.Maui"
Shell.FlyoutBehavior="Disabled"
Title="MauiApp1">

<Shell.Behaviors>
<xct:StatusBarBehavior StatusBarStyle="LightContent"/>
</Shell.Behaviors>

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

<TabBar Route="Tabbar">
<Tab Title="Tab 1">
<ShellContent
Title="Tab 1"
ContentTemplate="{DataTemplate local:MainPage}"/>
</Tab>
<Tab Title="Tab 2">
<ShellContent
Title="Tab 1"
ContentTemplate="{DataTemplate local:MainPage}"/>
</Tab>
</TabBar>
</Shell>
12 changes: 12 additions & 0 deletions samples/MauiApp1/AppShell.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace MauiApp1
{
public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();

GoToAsync("//Tabbar");
Comment thread
Pastajello marked this conversation as resolved.
Outdated
}
}
}
21 changes: 21 additions & 0 deletions samples/MauiApp1/InitialPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiApp1.InitialPage"
Title="InitialPage">

<Shell.TitleView >
<Grid BackgroundColor="Yellow">
<Label Text="TITLE VIEW" HorizontalOptions="Center" />

</Grid>
</Shell.TitleView>


<VerticalStackLayout>
<Label
Text="Welcome to .NET MAUI!"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentPage>
9 changes: 9 additions & 0 deletions samples/MauiApp1/InitialPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace MauiApp1;

public partial class InitialPage : ContentPage
{
public InitialPage()
{
InitializeComponent();
}
}
52 changes: 52 additions & 0 deletions samples/MauiApp1/MainPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
x:Class="MauiApp1.MainPage"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">

<Shell.TitleView>
<Grid BackgroundColor="Yellow">
<Label HorizontalOptions="Center" Text="TITLE VIEW" />

</Grid>
</Shell.TitleView>

<Grid RowDefinitions="auto, auto, *">
<Label Text="Top line" />

<VerticalStackLayout
Grid.Row="1"
Padding="30,0"
Spacing="25">
<Image
Aspect="AspectFit"
HeightRequest="185"
SemanticProperties.Description="dot net bot in a race car number eight"
Source="dotnet_bot.png" />

<Label
SemanticProperties.HeadingLevel="Level1"
Style="{StaticResource Headline}"
Text="Hello, World!" />

<Label
SemanticProperties.Description="Welcome to dot net Multi platform App U I"
SemanticProperties.HeadingLevel="Level2"
Style="{StaticResource SubHeadline}"
Text="Welcome to &#10;.NET Multi-platform App UI" />

<Button
HorizontalOptions="Fill"
SemanticProperties.Hint="Counts the number of times you click"
Text="Click me"
x:Name="CounterBtn" />
</VerticalStackLayout>

<Label
Grid.Row="2"
Text="Bottom"
VerticalOptions="End" />

</Grid>

</ContentPage>
12 changes: 12 additions & 0 deletions samples/MauiApp1/MainPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace MauiApp1
{
public partial class MainPage : ContentPage
{
int count = 0;

public MainPage()
{
InitializeComponent();
}
}
}
85 changes: 85 additions & 0 deletions samples/MauiApp1/MauiApp1.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net10.0-android;</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->

<!-- Note for MacCatalyst:
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->

<OutputType>Exe</OutputType>
<RootNamespace>MauiApp1</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<MauiVersion>10.0.51</MauiVersion>

Comment thread
Pastajello marked this conversation as resolved.
Outdated
<!-- Display name -->
<ApplicationTitle>MauiApp1</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>com.companyname.mauiapp1</ApplicationId>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>

<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />

<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />

<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" />

<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />

<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui" Version="14.1.0" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\CommunityToolkit.Maui.MediaElement.SourceGenerators\CommunityToolkit.Maui.MediaElement.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\CommunityToolkit.Maui.SourceGenerators\CommunityToolkit.Maui.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\CommunityToolkit.Maui.Analyzers\CommunityToolkit.Maui.Analyzers.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\CommunityToolkit.Maui.Analyzers.CodeFixes\CommunityToolkit.Maui.Analyzers.CodeFixes.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\CommunityToolkit.Maui.MediaElement.Analyzers\CommunityToolkit.Maui.MediaElement.Analyzers.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes\CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\CommunityToolkit.Maui.MediaElement\CommunityToolkit.Maui.MediaElement.csproj" />
<ProjectReference Include="..\..\src\CommunityToolkit.Maui.Camera\CommunityToolkit.Maui.Camera.csproj" />
<ProjectReference Include="..\..\src\CommunityToolkit.Maui\CommunityToolkit.Maui.csproj" />
<ProjectReference Include="..\..\src\CommunityToolkit.Maui.Maps\CommunityToolkit.Maui.Maps.csproj" />
</ItemGroup>
Comment thread
Pastajello marked this conversation as resolved.
Outdated

<ItemGroup>
<MauiXaml Update="InitialPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>

</Project>
25 changes: 25 additions & 0 deletions samples/MauiApp1/MauiProgram.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using CommunityToolkit.Maui;
using Microsoft.Extensions.Logging;

namespace MauiApp1
{
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseMauiCommunityToolkit()
.UseMauiCommunityToolkitMediaElement(false,null)
.ConfigureFonts(fonts =>
{
Comment thread
Pastajello marked this conversation as resolved.
Outdated
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});


return builder.Build();
}
}
}
6 changes: 6 additions & 0 deletions samples/MauiApp1/Platforms/Android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
11 changes: 11 additions & 0 deletions samples/MauiApp1/Platforms/Android/MainActivity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Android.App;
using Android.Content.PM;
using Android.OS;

namespace MauiApp1
{
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
{
}
}
16 changes: 16 additions & 0 deletions samples/MauiApp1/Platforms/Android/MainApplication.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Android.App;
using Android.Runtime;

namespace MauiApp1
{
[Application]
public class MainApplication : MauiApplication
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{
}

protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#512BD4</color>
<color name="colorPrimaryDark">#2B0B98</color>
<color name="colorAccent">#2B0B98</color>
</resources>
10 changes: 10 additions & 0 deletions samples/MauiApp1/Platforms/MacCatalyst/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Foundation;

namespace MauiApp1
{
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
}
14 changes: 14 additions & 0 deletions samples/MauiApp1/Platforms/MacCatalyst/Entitlements.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!-- See https://aka.ms/maui-publish-app-store#add-entitlements for more information about adding entitlements.-->
<dict>
<!-- App Sandbox must be enabled to distribute a MacCatalyst app through the Mac App Store. -->
<key>com.apple.security.app-sandbox</key>
<true/>
<!-- When App Sandbox is enabled, this value is required to open outgoing network connections. -->
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist>

Loading
Loading