Advertisement
smeacham

DropdownMenu.cs

May 31st, 2016
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.80 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. using Xamarin.Forms;
  8.  
  9. namespace NavigationDemoVS
  10. {
  11.     class DropdownMenu : ContentPage
  12.     {
  13.         public DropdownMenu()
  14.         {
  15.             ToolbarItems.Clear();
  16.             ToolbarItems.Add(new ToolbarItem
  17.             {
  18.                 Text = "Home",
  19.                 Order = ToolbarItemOrder.Secondary,
  20.                 Command = new Command(() => Navigation.PushAsync(new HomePage()))
  21.             });
  22.             ToolbarItems.Add(new ToolbarItem
  23.             {
  24.                 Text = "Second",
  25.                 Order = ToolbarItemOrder.Secondary,
  26.                 Command = new Command(() => Navigation.PushAsync(new secondPage()))
  27.             });
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement