Exemplo n.º 1
0
 private void SearchBox_Tapped(object sender, TappedRoutedEventArgs e)
 {
     if (NavPane.IsDrawerOpen)
     {
         NavPane.CloseDrawer();
     }
 }
Exemplo n.º 2
0
 private void MenuItems_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (MenuItems.SelectedItem != null)
     {
         var selecteditem = MenuItems.SelectedValue as string;
         NavPane.CloseDrawer();
         MenuItems.SelectedItem = null;
     }
 }
Exemplo n.º 3
0
 private void MenuIcon_Tapped(object sender, TappedRoutedEventArgs e)
 {
     if (NavPane.IsDrawerOpen)
     {
         NavPane.CloseDrawer();
     }
     else
     {
         NavPane.OpenDrawer();
     }
 }
Exemplo n.º 4
0
 void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e)
 {
     if (NavPane.IsDrawerOpen)
     {
         NavPane.CloseDrawer();
         e.Handled = true;
     }
     else
     {
         Application.Current.Exit();
     }
 }
Exemplo n.º 5
0
        private async void SearchIcon_Tapped(object sender, TappedRoutedEventArgs e)
        {
            if (NavPane.IsDrawerOpen)
            {
                NavPane.CloseDrawer();
            }

            if (SearchBox.Visibility == Visibility.Collapsed)
            {
                SearchBox.Visibility      = Visibility.Visible;
                MainPageHeader.Visibility = Visibility.Collapsed;
            }
            else
            {
                SearchBox.Visibility      = Visibility.Collapsed;
                MainPageHeader.Visibility = Visibility.Visible;
            }
            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => SearchBox.Focus(FocusState.Keyboard));
        }