示例#1
0
 private async void Instance_Holding(UINavigationManager sender, UINavigationButtons button)
 {
     await _UIDispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
     {
         if (Hold && button.HasFlag(Kind))
         {
             _Holding = true;
         }
     });
 }
示例#2
0
        private async void Instance_Pressed(UINavigationManager sender, UINavigationButtons button)
        {
            await _UIDispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
            {
                if (!IsEnabled)
                {
                    return;
                }

                if (Windows.UI.ViewManagement.InputPane.GetForCurrentView().Visible)
                {
                    return;
                }

                if (IsRequireFocus && !_NowFocusingElement)
                {
                    return;
                }

                if (!button.HasFlag(Kind))
                {
                    return;
                }

                if (Hold && !_Holding)
                {
                    return;
                }

                _Holding = false;

                foreach (var action in Actions.Cast <IAction>())
                {
                    action.Execute(this.AssociatedObject, null);
                }
            });
        }
 static UINavigationManager()
 {
     __Instance = new UINavigationManager();
 }