Giter Site home page Giter Site logo

egvijayanand / dotnet-maui-samples Goto Github PK

View Code? Open in Web Editor NEW
159.0 5.0 23.0 11.92 MB

.NET MAUI Samples

Home Page: https://egvijayanand.in/

License: MIT License

C# 96.18% HTML 1.60% CSS 1.47% F# 0.75%
maui maui-blazor dotnetmaui blazor hybrid ios android macos winui winui3

dotnet-maui-samples's Introduction

.NET MAUI Samples

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:

  • EmbeddedWindows - .NET MAUI Page embedded in a Native WinUI 3 App, targeting .NET 8 (net8.0-windows10.0.19041.0)
    • Refer to this article for working with this sample
  • MapsApp - .NET MAUI Maps embedded in a Native WinUI 3 App, targeting .NET 8 (net8.0-windows10.0.19041.0)
    • Refer to this article for working with this sample

Made available in the src\NET_9\ directory:

  • EmbeddedWindows - .NET MAUI Page embedded in a Native WinUI 3 App, targeting .NET 9 (net9.0-windows10.0.19041.0)
    • Refer to this article for working with this sample
  • MapsApp - .NET MAUI Maps embedded in a Native WinUI 3 App, targeting .NET 9 (net9.0-windows10.0.19041.0)
    • Refer to this article for working with this sample

Made available in the the src\ directory:

  • TestApp - .NET MAUI Shell sample
  • MenuApp - .NET MAUI sample app with multi-level menu definition in both XAML and C# (Will work only on Desktop form factor)
  • DateCalculator
    • MVVM Sample
    • Xamarin Forms and .NET MAUI in a single solution
    • WPF project to illustrate the reuse of ViewModels across UI frameworks
    • Shared business logic as a separate library project
    • ViewModels implemented with CommunityToolkit.Mvvm NuGet package
  • MauiBlazorApp - .NET MAUI Blazor sample
    • App Theming
    • State sharing between .NET MAUI and Razor Components
    • Components from shared Razor Class Library (RCL)
  • MauiAppCS - .NET MAUI C# Markup based Sample
  • UnifiedDateCalculator
    • Shared class library sample
    • UI, ViewModel, Model, and Business logic all from shared project
    • Head projects serve as an app container
    • Both Xamarin.Forms and .NET MAUI from a single project - DateCalculator.UI
  • EmbeddedAndroid - .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
    • A hybrid solution demonstrating the capabilities of BlazorWebView control
    • Loaded with .NET MAUI, Windows Forms, WPF, and WinUI 3 projects in a single solution
    • Razor components abstracted in a shared Razor Class Library (RCL)
    • While working with the WinUI 3 Unpackaged model, the below project property needs to be uncommented in the project file otherwise it'll result in the mentioned error message. And for the Packaged model, this can stay as commented or update its value as MSIX (the default value):
<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)

dotnet-maui-samples's People

Contributors

egvijayanand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dotnet-maui-samples's Issues

Forced Login?

This is not an issue, really. It is a question, and maybe an enhancement request. I'm quite new to Maui development, especially the navigation. In the app I'm currently writing I need to force login. In other words, no pages are available if the user is not logged in, and if the user logs out, he/she is taken back to the login page. Can you give me an idea how to accomplish this? This app looks like it's quite close, but I can't seem to figure out how to make it do what I'm trying.

Thanks a lot!

Problems on Windows

This is relatively trivial, but with a new, clean copy of the source, when I try to run on a Windows machine, it builds fine but produces the following problem when attempting to run (deploy):

Severity Code Description Project File Line Suppression State
Error DEP0700: Registration of the app failed. [0x80073CF6] AppxManifest.xml(33,27): error 0x80070003: Cannot install or update package ddf6acdf-63c8-4550-a5ad-d225a2822643_9zz4h110yvjzm because the splash screen image [appiconfgSplashScreen.png] cannot be located. Verify that the package contains an image that can be used as a splash screen for the application, and that the package manifest points to the correct location in the package where this splash screen image can be found. TestApp

It's simple enough to get past this error simply by deleting the splash screen reference in "Platforms\Windows\Package.appxmanifest", but I thought you might want to fix it for real. :)

Fails to build

Tried using your TestApp Project in visual Studio 2022 Version 17.1.0 Preview 4.0

Too many compile Error

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.