Creating and implementing the TwitterSignInPageViewModel using C#
In this section, we'll take a look at how to create the TwitterSignInPageViewModel
class so that it can communicate with our TwitterSignInPage
, as well as any data bindings associated with the ContentPage
that will be used by the ViewModel
. We will create and implement the underlying C# code for our ViewModel, which will be used by our TwitterSignInPage
code-behind file so that it can navigate within our NavigationStack
.
Let's start by creating the TwitterSignInPageViewModel
for our TrackMyWalks
app by performing the following steps:
- Ensure that the
TrackMyWalks
solution is open within the Visual Studio for Mac IDE. - Next, right-click on the
ViewModels
folder, and chooseAdd | New File...
from the pop-up menu, as you did in the section entitled Creating the WalksMainPageViewModel using C# within Chapter 5, MVVM and Data Binding. - Then, ensure that the
TwitterSignInPageViewModel.cs
file, which is located within theViewModels
folder...