Exemple #1
0
 protected virtual void UpdateRotaryInteraction(bool enable)
 {
     if (NativeView is IRotaryInteraction ri)
     {
         if (Specific.GetUseBezelInteraction(Application.Current))
         {
             if (enable)
             {
                 ri.RotaryWidget?.Activate();
                 Forms.RotaryFocusObject = Element;
                 Specific.SetActiveBezelInteractionElement(Application.Current, Element);
             }
             else
             {
                 ri.RotaryWidget?.Deactivate();
                 if (Forms.RotaryFocusObject == Element)
                 {
                     Forms.RotaryFocusObject = null;
                 }
                 if (Specific.GetActiveBezelInteractionElement(Application.Current) == Element)
                 {
                     Specific.SetActiveBezelInteractionElement(Application.Current, null);
                 }
             }
         }
     }
 }
Exemple #2
0
 protected virtual void OnPickerOpened(object sender, EventArgs args)
 {
     if (Specific.GetUseBezelInteraction(Application.Current))
     {
         // picker included in WatchDatePickedDialog has been activated, whenever the dialog is opend.
         Forms.RotaryFocusObject = Element;
         Specific.SetActiveBezelInteractionElement(Application.Current, Element);
     }
 }
Exemple #3
0
 protected virtual void OnPickerClosed(object sender, EventArgs args)
 {
     if (Specific.GetUseBezelInteraction(Application.Current))
     {
         if (Forms.RotaryFocusObject == Element)
         {
             Forms.RotaryFocusObject = null;
         }
         if (Specific.GetActiveBezelInteractionElement(Application.Current) == Element)
         {
             Specific.SetActiveBezelInteractionElement(Application.Current, null);
         }
     }
 }
Exemple #4
0
 void DeactivateRotaryWidget()
 {
     if (_currentRotaryFocusObject is IRotaryEventReceiver)
     {
         ERotaryEventManager.Rotated -= OnRotaryEventChanged;
     }
     else if (_currentRotaryFocusObject is IRotaryFocusable)
     {
         GetRotaryWidget(_currentRotaryFocusObject)?.Deactivate();
     }
     if (AppSpecific.GetActiveBezelInteractionElement(Application.Current) == base.Element)
     {
         AppSpecific.SetActiveBezelInteractionElement(Application.Current, null);
     }
 }
Exemple #5
0
        void ActivateRotaryWidget()
        {
            if (!Element.Appeared)
            {
                return;
            }

            if (_currentRotaryFocusObject is IRotaryEventReceiver)
            {
                ERotaryEventManager.Rotated += OnRotaryEventChanged;
            }
            else
            {
                GetRotaryWidget(_currentRotaryFocusObject)?.Activate();
            }
            AppSpecific.SetActiveBezelInteractionElement(Application.Current, base.Element);
        }