title: how i can navigate user to another page from viewmodel
body: <p>how i can navigate user to dashboard page after i got Access token and user successfully logged in or error messege when user entred wrong username or password </p>
  
  <p>here is my login viewmodel </p>
  
  <pre><code>using RoyalSales.Views;
  using System.Windows.Input;
  using Xamarin.Forms;
  using RoyalSalesAPI.Services;
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using Android.App;
  using Android.Content.Res;
  using RoyalSales.Helpers;
  
  namespace RoyalSales.ViewModels
  {
      class LoginViewModel
      {
          private APIServices _APIServices = new APIServices();
  
          public string Username { get; set; }
          public string Password { get; set; }
          public String Message { get; set; }
          public ICommand Logincommand =&gt; new Command(async () =&gt;
  {
  var accesssToken = await _APIServices.LoginAsync(Username, Password);
  if (!string.IsNullOrEmpty(accesssToken))
  {
  Message = "login succeed";
  
  Settings.Username = Username;
  
  Settings.Password = Password;
  
  Settings.AccessToken = accesssToken;
  // here i want navigate user to dashboard page 
  }
  else
  {
  Message = "wrong username or password";
  // here i want show message dialoge to tell user theres an wrong username or 
  password 
  
                                                            }
                                                        });
          public ICommand LogOutcommand
          {
              get
              {
                  return new Command( () =&gt;
                  {
  
  
                          Settings.AccessToken = null;
  
                  });
              }
          }
  
  
  
          public LoginViewModel()
          {
              if (!string.IsNullOrEmpty(Settings.Username))
              {
                  Username = Settings.Username;
                  Password = Settings.Password;
              }
          }
      }
  }
  </code></pre>
  
  <p>here is  my loginpage.cs</p>
  
  <pre><code>using Javax.Security.Auth;
  using RoyalSales.Views;
  using Android.Provider;
  using RoyalSalesAPI.Services;
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  using Xamarin.Forms;
  using Xamarin.Forms.Xaml;
  using RoyalSales.ViewModels;
  using RoyalSales.Helpers;
  using Settings = RoyalSales.Helpers.Settings;
  
  namespace RoyalSales
  {
      [XamlCompilation(XamlCompilationOptions.Compile)]
      public partial class Login : ContentPage
      {
          public APIServices aPIServices = new APIServices();
          private string accessToken = Settings.AccessToken.ToString();
          public Login()
          {
              InitializeComponent();
              NavigationPage.SetHasNavigationBar(this, false);
  
  
          }
  
          private async void Button_Clicked(object sender, EventArgs e)
          {
  
  
  
          }
      }
  }
  </code></pre>
  
  <p>here is my loginpage.xaml </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;ContentPage
      x:Class="RoyalSales.Login"
      xmlns="http://xamarin.com/schemas/2014/forms"
      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
      xmlns:viewModels="clr-namespace:RoyalSales.ViewModels;assembly=RoyalSales"
      Title="login page"
      BackgroundColor="#F38906"&gt;
      &lt;ContentPage.BindingContext&gt;
          &lt;viewModels:LoginViewModel /&gt;
      &lt;/ContentPage.BindingContext&gt;
      &lt;ContentPage.Content&gt;
          &lt;StackLayout
              Padding="20"
              Orientation="Vertical"
              Spacing="30"&gt;
              &lt;BoxView HeightRequest="20" /&gt;
              &lt;Image
                  HorizontalOptions="Center"
                  Source="almotaheda.png"
                  WidthRequest="175" /&gt;
              &lt;Label
                  FontSize="Large"
                  HorizontalOptions="Center"
                  Text="slogn"
                  TextColor="White" /&gt;
              &lt;Frame BackgroundColor="#FBD7AC" HasShadow="False"&gt;
                  &lt;StackLayout Orientation="Vertical" Spacing="10"&gt;
                      &lt;Entry
                          x:Name="UserNameEntry"
                          HeightRequest="40"
                          HorizontalTextAlignment="Center"
                          Placeholder="username"
                          PlaceholderColor="#F38906"
                          Text="{Binding Username}"
                          TextColor="Black" /&gt;
                      &lt;Entry
                          x:Name="PasswordEntry"
                          HeightRequest="40"
                          HorizontalTextAlignment="Center"
                          IsPassword="True"
                          Placeholder="Password"
                          PlaceholderColor="#F38906"
                          Text="{Binding Password}"
                          TextColor="Black" /&gt;
  
                  &lt;/StackLayout&gt;
              &lt;/Frame&gt;
              &lt;Label
                  FontSize="20"
                  Text="{Binding Message}"
                  TextColor="#FFFFFF" /&gt;
              &lt;Button
                  BackgroundColor="White"
                  Command="{Binding Logincommand}"
                  FontAttributes="Bold"
                  FontSize="20"
                  HorizontalOptions="FillAndExpand"
                  Text="login"
                  TextColor="#F38906" 
                  Clicked="Button_Clicked"/&gt;
              &lt;BoxView HeightRequest="20" /&gt;
  
          &lt;/StackLayout&gt;
  
      &lt;/ContentPage.Content&gt;
  &lt;/ContentPage&gt;
  </code></pre>
  
  <p>plese help my to navigate the user to dashboard page if successfuly logged in or error message if wrong username or password </p>