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
파일 보기 프로젝트 열기: Microsoft/Appsample-Photosharing

공개 메소드들

메소드 설명
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