Esempio n. 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);
                 }
             }
         }
     }
 }
Esempio n. 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);
     }
 }
Esempio n. 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);
         }
     }
 }