示例#1
0
 private void Gamepad_GamepadAdded(object sender, Gamepad e)
 {
     DispatcherHelper.CheckBeginInvokeOnUI(() =>
     {
         if (GamePadCollection == null)
         {
             GamePadCollection = new ObservableCollection <Gamepad>();
         }
         GamePadCollection.Add(e);
         GamePad = GamePad ?? e;
     });
 }