This video goes into detail about the ways you can structure your code so you can get the most out of commands.
- [Instructor] Before you get started…in making our first command,…let's take a look at our project structure.…Commands were built with the design principle in mind.…A command can be declared in one class…and instantiated in another.…This maintains an MVVM or MVC philosophy…when designing your code.…In our project, we have classes separated into Views,…ViewModels, and Controllers.…The Views contain only view logic…mostly in our XAML files.…As you can see, the CS file is mostly there.…
Our ViewModels contain the data models…we are working with on the view,…and Controllers will contain the bulk…of our business logic.…In MVVM you can add your business logic…in the ViewModels, but I like to keep it separate…in the Controller to promote better team collaboration.…If we take a look at our ViewModels,…we can see that they inherit from a BaseViewModel.…This BaseViewModel implements the INotifyPropertyChange…interface, which allows us to create…a two way data binding by invoking methods…using the SetProperty field.…
The Controllers derive from a BaseController class…
- Creating and implementing behaviors
- Stacking behaviors
- Adding behaviors to styles
- Creating commands
- Setting up and implementing triggers
- Tying it all together in a Xamarin app
Skill Level Intermediate
F# and Xamarin Development Basicswith Rachel Blasucci56m 43s Intermediate
1. Using Xamarin Behaviors
2. Using Xamarin Commands
3. Using Xamarin Triggers
4. Tying It All Together
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.