.NET MAUI Samples
MIT License
Completed samples will be uploaded into this repository so that it is accessible to everyone.
Join me on Developer Thoughts, an exclusive blog for .NET MAUI and Blazor, for articles on working with these samples.
Note: Samples are in the process of migrating to the latest framework version, so there would be a change in the directory structure. Kindly bear with this.
Made available in the src\NET_8\
directory:
Solution Title | Description |
---|---|
EmbeddedWindows |
.NET MAUI Page embedded in a Native WinUI 3 App Refer to this .NET MAUI - Native Embedding article for working with this sample |
MapsApp |
.NET MAUI Maps embedded in a Native WinUI 3 App Refer to this .NET MAUI Community Toolkit Maps in WinUI 3 App article for working with this sample |
ThemedApp |
Sample app for .NET MAUI App Theming Refer to this .NET MAUI - App Theming article for further details |
DateCalculator |
MVVM SampleXamarin Forms and .NET MAUI in a single solutionWPF and WinUI projects to illustrate the reuse of ViewModels across UI frameworksWinForms project to illustrate the reuse of ViewModels across non-XAML UI framework tooShared business logic as a separate library projectViewModels implemented with CommunityToolkit.Mvvm (aka Microsoft MVVM Toolkit) NuGet package |
UnifiedDateCalculator |
Shared class library sampleUI, ViewModel, Model, and Business logic all from shared projectHead projects serve as an app containerBoth Xamarin.Forms and .NET MAUI UI definition from a single project - DateCalculator.UI ViewModels implemented with CommunityToolkit.Mvvm (aka Microsoft MVVM Toolkit) NuGet package
|
Made available in the src\NET_9\
directory:
Solution Title | Description |
---|---|
EmbeddedAndroid |
.NET MAUI Page embedded in a .NET 9 for Android App Refer to this .NET MAUI - Native Embedding article for working with this sample |
EmbeddediOS |
.NET MAUI Page embedded in a .NET 9 for iOS App Refer to this .NET MAUI - Native Embedding article for working with this sample |
EmbeddedWindows |
.NET MAUI Page embedded in a Native WinUI 3 App Refer to this .NET MAUI - Native Embedding article for working with this sample |
MapsApp |
Using .NET MAUI CommunityToolkit.Maui.Maps embedded in a Native WinUI 3 App Refer to this .NET MAUI Community Toolkit Maps in WinUI 3 App article for working with this sample |
HybridWebViewApp |
A sample .NET MAUI App showcasing the features of the new HybridWebView control. Refer to this Exploring .NET MAUI 9: HybridWebView Features article for working with this sample |
WinUIBlazor |
.NET MAUI BlazorWebView embedded in a Native WinUI 3 App, making it as a Blazor Hybrid app Refer to this .NET MAUI - Blazor Hybrid - WinUI 3 article for working with this sample |
Made available in the the src\
directory:
TestApp
- .NET MAUI Shell sampleMenuApp
- .NET MAUI sample app with multi-level menu definition in both XAML and C# (Will work only on Desktop form factor)
MauiBlazorApp
- .NET MAUI Blazor sample
MauiAppCS
- .NET MAUI C# Markup based SampleEmbeddedAndroid
- .NET MAUI Page embedded in a Native Android App, targeting .NET 6 (net6.0-android
)MediaElement
- Sample project in both .NET 6 and 7. Now made available in Preview bits as part of the .NET MAUI CommunityToolkit - And it'll be a separate NuGet package titled CommunityToolkit.Maui.MediaElement
MauiHotReload
- Sample project to demonstrate C# Hot Reload feature supported via MetadataUpdateHandler (refer to HotReloadService.cs). Core logic is abstracted into a base page named MauiPage
, inherit the content pages from it and implement the UI logic in the override of the abstract Build()
method. Source is available in the src\MauiHotReload
folder.WindowsUnpackagedApp
- Sample project to demonstrate running Windows targeted WinUI 3 project as Unpackaged app type.PopupDialogs
- Sample project to demonstrate the custom dialogs implemented with VijayAnand.MauiToolkit.Pro NuGet package.HybridRclApp
- BlazorWebView
hybrid sample
BlazorWebView
control.NET MAUI
, Windows Forms
, WPF
, and WinUI 3
projects in a single solution<WindowsPackageType>None</WindowsPackageType>
Error message: Unable to load DLL 'Microsoft.ui.xaml.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)