Let’s restructure the default project Template for Xamarin.Forms Shell Apps provided by Visual Studio 2019, clean it up, optimize it for the best use of Shell features. ;)
The goal here is to adopt only Xamarin.Forms Shell related implementation, features, and practices into the default Template, so it gives a clear, easy to understand, straight forward view of using Xamairn.Forms Shell to build apps. Thinking in terms of simplest terms, decoupled components with clean and readable code, we need to reflect the best practices of Xamarin.Forms in the Template. ;)
Step by step:
- Step 1: Cleaning up Colors and Styles…
- Step 2: BaseViewModel to Infrastructure!
- Step 3: BindingContext in the Constructor()
- Step 4: Clean up ItemDetailViewModel!
- Step 5: Setting up Query Parameters…
- Step 6: Use proper Shell Navigation!
- Step 7: Set up NewItemViewModel!
- Step 8: Use proper Modal Navigation!
- Step 9: Overall code quality clean up…
Xamarin.Forms Shell is actually an awesome new paradigm to build Xamarin.Forms app, but honestly the VS2019 Template project could really use some proper restructuring for making it easier and straight forward for the beginners to start off. ;)