C# Класс PhotoSharingApp.Universal.Controls.NavMenuListView

A specialized ListView to represent the items in the navigation menu.
This class handles the following: 1. Sizes the panel that hosts the items so they fit in the hosting pane. Otherwise, the keyboard may appear cut off on one side b/c the Pane clips instead of affecting layout. 2. Provides a single selection experience where keyboard focus can move without changing selection. Both the 'Space' and 'Enter' keys will trigger selection. The up/down arrow keys can move keyboard focus without triggering selection. This is different than the default behavior when SelectionMode == Single. The default behavior for a ListView in single selection requires using the Ctrl + arrow key to move keyboard focus without triggering selection. Users won't expect this type of keyboarding model on the nav menu.
Наследование: Windows.UI.Xaml.Controls.ListView
Показать файл Открыть проект

Открытые методы

Метод Описание
NavMenuListView ( ) : System
SetSelectedItem ( ListViewItem item ) : void

Mark the item as selected and ensures everything else is not. If the item is null then everything is unselected.

Защищенные методы

Метод Описание
OnApplyTemplate ( ) : void
OnKeyDown ( KeyRoutedEventArgs e ) : void

Custom keyboarding logic to enable movement via the arrow keys without triggering selection until a 'Space' or 'Enter' key is pressed.

Приватные методы

Метод Описание
InvokeItem ( object focusedItem ) : void
ItemClickedHandler ( object sender, ItemClickEventArgs e ) : void
OnPaneToggled ( ) : void

Re-size the ListView's Panel when the SplitView is compact so the items will fit within the visible space and correctly display a keyboard focus rect.

TryMoveFocus ( FocusNavigationDirection direction ) : void

This method is a work-around until the bug in FocusManager.TryMoveFocus is fixed.

Описание методов

NavMenuListView() публичный Метод

public NavMenuListView ( ) : System
Результат System

OnApplyTemplate() защищенный Метод

protected OnApplyTemplate ( ) : void
Результат void

OnKeyDown() защищенный Метод

Custom keyboarding logic to enable movement via the arrow keys without triggering selection until a 'Space' or 'Enter' key is pressed.
protected OnKeyDown ( KeyRoutedEventArgs e ) : void
e Windows.UI.Xaml.Input.KeyRoutedEventArgs The event arguments.
Результат void

SetSelectedItem() публичный Метод

Mark the item as selected and ensures everything else is not. If the item is null then everything is unselected.
public SetSelectedItem ( ListViewItem item ) : void
item Windows.UI.Xaml.Controls.ListViewItem The item to select.
Результат void