Sample app that separates the new .NET MAUI 11 Preview 4 additions from the .NET MAUI 11 Preview 3 samples that are still included for comparison.
For the previous walkthrough, check out the video: What's New in .NET MAUI 11 Preview 3
- Shell and ToolbarItem badges —
BadgeText,BadgeColor, andBadgeTextColoron Shell tabs and primary toolbar items - CoreCLR runtime default — Preview 4 uses CoreCLR by default for .NET MAUI targets
- Material 3 Android controls — sample
ImageButton,DatePicker,Entry, andSlidercontrols that pick up the expanded Material 3 handlers on Android x:Codedirective — inline C# event handler declared directly in XAML- Compiled bindings in
DataTemplates — strongly typedCollectionViewtemplate withx:DataType dotnet watchfor Android and iOS — project settings include the iOS simulatorMtouchLink=Noneworkaround from the Preview 4 release notes- Android themed icons —
MauiIconnow declares a dedicatedMonochromeFilelayer
- Pin clustering — group nearby pins automatically with
IsClusteringEnabledandClusteringIdentifier - Custom pin icons — use any image as a pin marker via
Pin.ImageSource - Long press to drop pins —
MapLongClickedevent for adding pins interactively - Overlay click events —
CircleClickedandPolygonClickedon map elements - Overlay visibility — toggle overlays with
MapElement.IsVisible
- Built-in long press — first-party
LongPressGestureRecognizerwith configurableMinimumPressDuration - State tracking —
LongPressingevent withGestureStatusfor real-time feedback - Position tracking —
GetPosition()to get touch coordinates relative to any element
- Implicit namespaces — no more
xmlns=boilerplate; standard MAUI andx:namespaces are implicit in .NET 11 - Source generation by default — XAML source gen is now on for all pages with lazy resource loading
- New style APIs —
InvalidateStyle()andVisualStateManager.InvalidateVisualStates()for runtime style mutations
- .NET 11 Preview 4 SDK
- .NET MAUI workload:
dotnet workload install maui - Xcode 26.4+ (iOS/macOS)
git clone https://github.com/jfversluis/MauiNet11Preview3Sample.git
cd MauiNet11Preview3Sample
# iOS
dotnet build -f net11.0-ios
dotnet build -t:Run -f net11.0-ios
# Android
dotnet build -f net11.0-android
dotnet build -t:Run -f net11.0-android
# Hot Reload with Preview 4 dotnet watch
dotnet watch -f net11.0-android
dotnet watch -f net11.0-ios| Preview 4 additions | Preview 3 Maps | Preview 3 Long Press | Preview 3 XAML |
|---|---|---|---|
| Badges, x:Code, Material 3, compiled DataTemplates | Pin clustering, custom icons, overlays | Configurable duration, position tracking | Implicit namespaces, source gen |
This project is licensed under the MIT License.