示例#1
0
 /// <summary> 当页面被卸载时执行 </summary>
 private void Page_Unloaded(object sender, RoutedEventArgs e)
 {
     TilesView.RemoveHandler(UIElement.KeyDownEvent, keyDownHandler);
     keyDownHandler = null;
 }
示例#2
0
 /// <summary> 当页面加载完毕时执行 </summary>
 private void Page_Loaded(object sender, RoutedEventArgs e)
 {
     this.keyDownHandler = new KeyEventHandler(TilesView_KeyDown);
     TilesView.AddHandler(UIElement.KeyDownEvent, keyDownHandler, true);
 }