This is an excellent example of how to start with MAUI. There are some abstractions needed for things like local storage and auth, but that is not the point of this video. This helped me even more than some Udemy courses.
Hello... what .NET version are you using? I had a similar approach with a target of.NET 7. I upgraded the project to use .NET 8 and navigation stopped working.
I have problems with DI, I have several services Injected, but when I navigate from Login (ShellContent) to Main page (Tab) the transient services do not recreate them... seems like they are singleton through the Tab page any idea? how can I refresh the DI on that scene
Nice explanation. Thank you for your wonderful demo. Could you please prepare a dynamic shell item base on permission. It will be more helpful for us .
Hi Pragnesh, Thank you for the video. I'm starting learning .NET MAUI but once I launch a new project to do the login, I couldn't see Views and viewModels files. Is something additional that I have to do? I don't want to just clone the repo but instead understand it, thank you for any help!
HI, You Need to create MVVM Structure , When You create new project you can not see anything like Views, Models, ViewModels, Just create this three folder and add Pages & there ViewModel on dependent folder.
This is great. For me to get logout button hooked up properly, I had to add a binding context to the app shell xaml at the top of the file: xmlns:viewmodels="clr-namespace:MyApp.ViewModels" x:DataType="viewmodels:AppShellViewModel"
Hi mitchy, On App.xaml.cs I set MainPage = new AppShell(); and In AppShell.xaml page I have added First ShellContent as LoadingPage , and on Loading page I will check like User is logged in or not, If not logged In that It Open Login Page Other Wise Dashboard Page.
How to make flyout button being visible before user logins? For example; I want to see all pages in flyout menu before user log in, in Dashboard tab in the flyout I want to show Login screen before login, and in the same Dashboard tab I want to show Dashboard page after user login. So it will be possible to see other pages in layout menu before login, also not possible to see Dashboard page before login. Any idea how to do this?
It seems like the login page still loaded when Login->DashboardPage appears->Logout->LoginPage Appears with the credentials in the corresponding entries.
Oh that, I was just showing, users stay login after closing and re-opening the application, and for different user roles I can display shell item dynamically based on condition.
One way of doing this is to use ListView or Collection inside Shell.FlyoutContent and based on condtion add items into some object and bind it to list or CollectionView from AppShellViewModel.
I structured my apshell.xaml page in the exact same way you did and yet both login page and dashboard page appear as flyout pages . Am i missing something here ? I only want the dashboard page as a flyout page .
@@kratos7ism Hi, By Setting this two property for the LoginPage Shell Content will hide Flyout FlyoutItemIsVisible="False" Shell.FlyoutBehavior="Disabled" If this still not work, can you share your code
At 40:40 when I restart the app it throws an exception "Pending navigations still processing" at this line "await Shell.Current.GoToAsync($"//{nameof(DashboardPage)}");" This is on Windows only.
Good video, what is the configuration of the system you use.? A video with Your suggestion(like specific emulator etc for both iOs and Android) to setup good dev environment ..
Hello , My System Configuration Intel I5 - 7th Generation (24 GB Ram), 500 GB SSD, 8GB NVIDIA GeForce GTX 1070 Graphic Card. And I am using real device for testing, because emulator works slow even in my system.
@@ProgrammingWithPragnesh thanks, can I use iPad for iOS side testing- connecting to Visul stodio of PC ? Also for using physical iOS device I need paid iOS developer account?
@@Grand1Master Hi, for testing in simulator or real device you need mac system. In that you can connect real device for testing. and for testing in debug mode you don't need developer account. If you want to run app in distribution mode then only you need developer account and required certificates.
Hi Thank you so much for supporting my all videos. here is the project url:github.com/mistrypragnesh40/SimpleLoginUI Right now this project only has login flow without api integration. I will try to create one video for JWT based login.
Yes, because navigation code I need to add in main threads, I will add that code, for now you can use disptacher.Disptach and in that just add Shell.Current.GoAsync()
in Registry Editor 1. Go to path Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework in right side delete the file manger Debugger then restart ur computer 2. Go to path Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug and delete the Debuger from right side (Make sure that the path is written carefully)
Halo Pragnesh, thanks for your tutorials. i succeded follow your tutorial. but, i have a problem when publish to my android device. my app force close when open in android. and i found that the problem is from this code:
whats wrong with this code, is there some setting that i should set? because when i remove this code and publish and install to my android. the app is work, no force close. could you give me some advice? thanks
@@ProgrammingWithPragnesh thanks for your fast response. i changed code to this and still didnt work. any others advice? or maybe is there any tools or something to debug error? thanks
@@ProgrammingWithPragnesh thanks for helping me. cant wait to see the result. success for you! :) edited: it caused zindex and cornerradius, i remove them and it works. thanks
Another wonderful video. Thank you very much for sharing your knowledge with us ;) Could you make a video on how to do a "dropdown"? I would like to learn so that in the first dropdown, a list of Countries appears, in the second, a list of cities (of the selected country) and in the third dropdown, a list of neighborhoods (of that city that you selected, of that country that you selected) Do I explain myself well? Thank you very much anyway ;)
This is an excellent example of how to start with MAUI. There are some abstractions needed for things like local storage and auth, but that is not the point of this video. This helped me even more than some Udemy courses.
I'm learning a lot from you sir. Appreciate all your hard work teaching.
Thank you ...
Very well explained, and you kept a sharp eye on very simple but tricky things 💯 👏
Thank you
Thank you very much for your initiative, looking forward some advance level tutorials, i am watching all the post you shared.
Thank you so much for watching it.
Thank you so much, you're a great teacher, explaining very well!
Yoo, really nice vídeo, thanks for sharing buddy! 🥰🥰
Thank you too
Thanks brother for the content, I leaned something new from this. In return you got a new subscriber here 😉👍
Thank you so much.
Thank you for the presentatiton. How about if we want to clear email & password entries while signing out?
I am in trouble with this issue.
Your mean data stored in preferences if yes then , you can just call Preferences.Clear(); to clear all data.
Hello... what .NET version are you using? I had a similar approach with a target of.NET 7. I upgraded the project to use .NET 8 and navigation stopped working.
I have problems with DI, I have several services Injected, but when I navigate from Login (ShellContent) to Main page (Tab) the transient services do not recreate them... seems like they are singleton through the Tab page any idea? how can I refresh the DI on that scene
Nice explanation. Thank you for your wonderful demo. Could you please prepare a dynamic shell item base on permission. It will be more helpful for us .
Thank you, Yes I will create video on displaying shell item dynamically.
Here Is the video for dynamic shell item : th-cam.com/video/lSmRAV5IIBs/w-d-xo.html
Just a quick one. When clicking login and being navigated to Dashboard page, my flyout it replaced with an
Hi Pragnesh, Thank you for the video.
I'm starting learning .NET MAUI but once I launch a new project to do the login, I couldn't see Views and viewModels files. Is something additional that I have to do?
I don't want to just clone the repo but instead understand it, thank you for any help!
HI, You Need to create MVVM Structure , When You create new project you can not see anything like Views, Models, ViewModels,
Just create this three folder and add Pages & there ViewModel on dependent folder.
This is great. For me to get logout button hooked up properly, I had to add a binding context to the app shell xaml at the top of the file:
xmlns:viewmodels="clr-namespace:MyApp.ViewModels"
x:DataType="viewmodels:AppShellViewModel"
Do you think it's safe to use .net maui for a corporate project?
Yes
How did you get the app to start on the loginPage instead of Mainpage?
Hi mitchy, On App.xaml.cs I set MainPage = new AppShell();
and In AppShell.xaml page I have added First ShellContent as LoadingPage , and on Loading page I will check like User is logged in or not, If not logged In that It Open Login Page Other Wise Dashboard Page.
Can we have both flyout and tabbed option in a same page?
Yes
Awesome video. thanks
How to make flyout button being visible before user logins?
For example; I want to see all pages in flyout menu before user log in, in Dashboard tab in the flyout I want to show Login screen before login, and in the same Dashboard tab I want to show Dashboard page after user login. So it will be possible to see other pages in layout menu before login, also not possible to see Dashboard page before login. Any idea how to do this?
Hi , In login page i set flyoutitrmvisibility to false , if you set true that page dispkay as flyout menu.
It seems like the login page still loaded when Login->DashboardPage appears->Logout->LoginPage Appears with the credentials in the corresponding entries.
Why do you have to kill the application to switch between users and also how do you plan to handle shell navigation for different user roles?
Oh that, I was just showing, users stay login after closing and re-opening the application, and for different user roles I can display shell item dynamically based on condition.
@@ProgrammingWithPragneshSince Shell is create once, which event or where can we do that?
One way of doing this is to use ListView or Collection inside
Shell.FlyoutContent and based on condtion add items into some object and bind it to list or CollectionView from
AppShellViewModel.
th-cam.com/video/lSmRAV5IIBs/w-d-xo.html
I structured my apshell.xaml page in the exact same way you did and yet both login page and dashboard page appear as flyout pages . Am i missing something here ? I only want the dashboard page as a flyout page .
Can you download this code and try it : github.com/mistrypragnesh40/SimpleLoginUI
@@ProgrammingWithPragnesh I have already done that . thanks for replying though.
@@kratos7ism Hi, By Setting this two property for the LoginPage Shell Content will hide Flyout
FlyoutItemIsVisible="False" Shell.FlyoutBehavior="Disabled"
If this still not work, can you share your code
@@ProgrammingWithPragnesh I have already managed to find the solution to this problem but u are so helpful my friend. Have a great day.
Hello, thanks for this amazing tutorial. One question, I'd like to have both the flyout menu and tabs. How can I add tabs to this solution?
At 40:40 when I restart the app it throws an exception "Pending navigations still processing" at this line "await Shell.Current.GoToAsync($"//{nameof(DashboardPage)}");" This is on Windows only.
Good video, what is the configuration of the system you use.? A video with Your suggestion(like specific emulator etc for both iOs and Android) to setup good dev environment ..
Hello ,
My System Configuration
Intel I5 - 7th Generation (24 GB Ram),
500 GB SSD,
8GB NVIDIA GeForce GTX 1070 Graphic Card.
And I am using real device for testing, because emulator works slow even in my system.
@@ProgrammingWithPragnesh thanks, can I use iPad for iOS side testing- connecting to Visul stodio of PC ? Also for using physical iOS device I need paid iOS developer account?
@@Grand1Master Hi, for testing in simulator or real device you need mac system. In that you can connect real device for testing. and for testing in debug mode you don't need developer account. If you want to run app in distribution mode then only you need developer account and required certificates.
Please help 🙏
When you logout the entry form text is cached. (Email and password of the fields)
I solved this using OnAppearing() method on my login page by manually setting fields to empty tring
Amazing, thank you!
Glad you liked it!
Hello sir, I have an error, when I navigate too many times to the same page, I get an item with the same key has already been added. Key: 0
Many thanks for github repo
Good stuff! Thank you.
Thank you
Good work
Thank you
Can you make video on IShare for sharing the links?
Great teacher. I am learning a lot from all your videos.could you share a full login project base jwt api?thank you.
Hi Thank you so much for supporting my all videos. here is the project url:github.com/mistrypragnesh40/SimpleLoginUI
Right now this project only has login flow without api integration. I will try to create one video for JWT based login.
@@ProgrammingWithPragnesh great!thank you very much!!
Looking for registraron and login with JWT with MAUI
Thanx >
Why the code doesn't run when i choose the windows machine???
but it run with android??
I need this code in desktop app
Yes, because navigation code I need to add in main threads, I will add that code, for now you can use disptacher.Disptach and in that just add Shell.Current.GoAsync()
@@ProgrammingWithPragnesh I will wait you , I don't understand what u mean
@@omyoubee7250 I added changes in master branch of SimpleLoginUI. Can you check now.
@@ProgrammingWithPragnesh THANKS ALOT
@@ProgrammingWithPragnesh when I run after your edit first time ok , then no resual "loading page ........." and does not load any thing
when I Run the project the Error " An unhandled win32 exception occurred 14300"
How I can solve the problem?
I solved it
Can you share your solution here, So other user can also get idea.
in Registry Editor
1. Go to path
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework
in right side delete the file manger Debugger
then restart ur computer
2. Go to path
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug
and delete the Debuger from right side (Make sure that the path is written carefully)
I tried ran the code from github but it has 24 errors
لما نزلت الكود من الجت هب لم يشتغل ظهرت رسالة خطأ في الديبق . ياريت حد يساعدني
Halo Pragnesh, thanks for your tutorials. i succeded follow your tutorial. but, i have a problem when publish to my android device. my app force close when open in android. and i found that the problem is from this code:
whats wrong with this code, is there some setting that i should set? because when i remove this code and publish and install to my android. the app is work, no force close. could you give me some advice? thanks
Can you remove ZIndex property and then publish app
@@ProgrammingWithPragnesh
thanks for your fast response. i changed code to this and still didnt work. any others advice? or maybe is there any tools or something to debug error? thanks
I will check and let you know, till that can you try clean and rebuild solution after removing zindex.
@@ProgrammingWithPragnesh thanks for helping me. cant wait to see the result. success for you! :)
edited:
it caused zindex and cornerradius, i remove them and it works. thanks
Another wonderful video. Thank you very much for sharing your knowledge with us ;)
Could you make a video on how to do a "dropdown"? I would like to learn so that in the first dropdown, a list of Countries appears, in the second, a list of cities (of the selected country) and in the third dropdown, a list of neighborhoods (of that city that you selected, of that country that you selected) Do I explain myself well?
Thank you very much anyway ;)
Yes I got you, do you want demo with api integration or just static country nd state list?
@@ProgrammingWithPragnesh Yes Please!!!! demo with api integration and Static... hahaha.It's possible?? So you show us the two options.
@@iva29234 Okay I will try to create video on this weekend.
th-cam.com/video/lzNdZMwVj-c/w-d-xo.html
This is what I'm looking for.
Thank you
You flippen Machine!!!!
Can you make a tutorial about a real-world reservation app with firebase with API calls, please?
HI, I will try to create it. Thanks for your suggestion.
How is your android emulator so fast...
Hi, I m using real device for running app.
you used StackLayout but when the resolution are different on mobile, the page will be diffrent... Used Grid !!
ICommand gives error : Error CS0653 Cannot apply attribute class ICommand because it is abstract
Reinstall Visual Studio
downgrade ur toolkit.mvvm ver 8 -> 7.1.2
Have u no tongue ? speak...