Skip to content

yvlawy/Maui-Mvvm-HelloWorld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

.NET MAUI MVVM Hello World! project

This source code contains the MAUI default project generated by visual Studio 2022 transformed in a MVVM way.

The initial source code is obtained by creating a new MAUI project in Visual Studio 2022 Preview. The source code is not MVVM compliant.

For now, the current version of MAUI is preview 14.

1. Steps to transform the project in MVVM

  • In the project, Create folders: Pages and ViewModels.

  • Move MainPage.xaml in the folder Pages.

  • In ViewModels, Create BaseViewModel.cs, MainViewModel.cs.

  • Modify Mainpage.xaml:
    Bind the page to the view model.

  • Bind label and button to the view model.

  • Modify MainPage.xaml.cs
    Remove the backend code.

2. More .NET MAUI ressources

For more ressources, see:

-https://github.com/MahmudX/awesome-maui

-https://github.com/yvlawy/NET-MAUI-Ressources

About

MAUI MVVM Hello World!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages