Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save eduardoguilarducci/6e29c6d108ff38df608cea78c8c72957 to your computer and use it in GitHub Desktop.
Save eduardoguilarducci/6e29c6d108ff38df608cea78c8c72957 to your computer and use it in GitHub Desktop.
...
var navigationView = FindViewById<NavigationView>(Resource.Id.nav_view);
navigationView.NavigationItemSelected += NavigationView_NavigationItemSelected;
}
void NavigationView_NavigationItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e)
{
switch (e.MenuItem.ItemId)
{
case (Resource.Id.nav_home):
Toast.MakeText(this, "selecionando menu Home", ToastLength.Short).Show();
break;
case (Resource.Id.nav_xamarin):
Toast.MakeText(this, "selecionando menu Xamarin", ToastLength.Short).Show();
break;
case (Resource.Id.nav_microsoft):
Toast.MakeText(this, "selecionando menu Microsoft", ToastLength.Short).Show();
break;
case (Resource.Id.nav_medium):
Toast.MakeText(this, "selecionando menu Medium", ToastLength.Short).Show();
break;
case (Resource.Id.nav_menu1):
Toast.MakeText(this, "selecionando menu Menu 1", ToastLength.Short).Show();
break;
case (Resource.Id.nav_menu2):
Toast.MakeText(this, "selecionando menu Menu 2", ToastLength.Short).Show();
break;
case (Resource.Id.nav_menu3):
Toast.MakeText(this, "selecionando menu Menu 3", ToastLength.Short).Show();
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment