This blog provides show notes for our March 16, 2023, webinar, “Coding a Cookbook with .NET MAUI.” The webinar is presented and hosted by Syncfusion developer Chad Church and JetBrains developer advocate Khalid Abuhakmeh. If you missed it or would like to watch it again, you’ll find the recording on our YouTube channel or embedded below.
Join us as Syncfusion developer Chad Church and JetBrains developer advocate Khalid Abuhakmeh collaborate on a .NET MAUI mobile app for building your own cookbook. Snap a picture of a recipe anywhere, annotate it, sort it alongside others, and pull it up whenever you need it. See firsthand how .NET MAUI makes mobile development fast, and efficient and puts powerful features at your fingertips.
- [00:00] Introduction
- [01:28] Our Thoughts: Xamarin vs. .NET MAUI
- [02:14] Starting with a Cookbook App
- [07:30] Taking a Look at the Code Part 1
- [29:25] What is MVU?
- [30:17] What’s the Difference Between Syncfusion’s ListView and MAUI’s Control ListView?
- [34:08] Migrating from Xamarin to .NET MAUI
- [30:30] Taking a Look at the Code Part 2
- [43:30] Deploying the App
- [48:16] Running the App on Your Mobile Device
- [49:04] Adding an Image in Your App
- [50:54] Session Summary
What is the advantage of using an app instead of coding for the web, utilizing @media for device support?
Device manufacturers typically have native APIs that are not always immediately available to web developers. These APIs can access hardware specific to a device, allowing developers to build new and exciting use cases.
Does hot reload work in Rider with MAUI?
JetBrains Rider does not currently support MAUI hot reload as of version 2023.1. If you want to see it implemented sooner than later, please visit our Rider issue tracker and express your interest.
A lot of Xamarin developers did not inject the ViewModels into the dependency container. MAUI has decided to inject ViewModels. Do you have any insight on this change?
MAUI has built-in support for the inversion of control pattern using dependency injection. The change mirrors the additions made on the ASP.NET Core side of .NET development. It simplifies managing cross-cutting dependencies as your application grows but is entirely optional. It’s a matter of preference and choice, so please talk to your team members before deciding whether to adopt the approach and whether it suits your use case.
Is there a free JetBrains Rider license?
While we do not offer free licenses, JetBrains has generous trial licenses and licenses for folks who fall into particular categories, such as students, educators, and open-source work. Please visit Jet Brains to see if any of these apply to your particular situation. You can also try out upcoming versions of Rider through our Early-Access Program, found at Jet Brains.
In Rider, deploying to the Android emulator is a lot slower than VS for Mac. Any insight on this? Is there a setting we can change to speed this up?
Currently, initiating the build will rebuild all target frameworks in the solution. We are investigating how to run a user-specified target to reduce the project build time when running against one platform. Please stay tuned.
JetBrains has a new IDE, Fleet, in preview. Does it support MAUI too? Would that be preferred over Rider when it is released?
Fleet is a fantastic option for writing C#, but it does not provide the current Rider features for managing devices, SDKs, and other Android features. You could make Fleet work for you If you are writing a C#-focused mobile app (no XAML) and are comfortable with the command-line tooling of MAUI. For now, Rider is the better option for MAUI development.
Does deploy and debug on a mobile phone work with MAUI?
Yes, you can debug your MAUI applications using JetBrains Rider. You can also deploy to a physical device for testing, as Chad Church demonstrated in the webinar.
Can you start an MAUI solution in VS 2022 and also open it in Rider?
Yes! JetBrains Rider does not alter the solution or project files for proprietary purposes. That’s true for all solutions, not just MAUI ones.
Does Blend for VS 2022 work with MAUI XAML?
I am not aware of Blend support for MAUI. In the latest WinUI Community Call, the issues with Blend and MAUI are discussed in detail.
How do you reference a netstandard2.0 shared project/library with type definitions in a MAUI project?
You create a separate netstandard2.0 library project and reference it in your MAUI project. You can see an example in the following screenshot.
To review, in this webinar, we covered steps that will help any developer start their first .NET MAUI app. We hope you enjoyed this webinar and that you’ll keep an eye out for our future .NET MAUI webinars.
- Cookbook Sample Project on GitHub
- .NET MAUI Community Toolkit NuGet Package
- .NET MAUI Community Toolkit MVVM NuGet Package
- .NET MAUI Community Toolkit on GitHub
- .NET MAUI Community Toolkit Documentation