/// <summary> /// Gets the collection of hardware key listeners for this ContentPage /// </summary> /// <returns>The hardware key listeners.</returns> /// <param name="page">Forms9Patch.HardwareKeyPage.</param> public static ObservableCollection <HardwareKeyListener> GetHardwareKeyListeners(this PopupBase page) => GetHardwareKeyListeners(page as VisualElement);
/// <summary> /// Clears the hardware key listeners for this HardwareKeyPage. /// </summary> /// <param name="page">Page.</param> public static void ClearHardwareKeyListeners(this PopupBase page) => ClearHardwareKeyListeners(page as VisualElement);
/// <summary> /// Removes a hardware key listener from this Xamarin.Forms.View. /// </summary> /// <param name="page">Forms9Patch.HardwareKeyPage.</param> /// <param name="listener">Listener.</param> public static void RemoveHardwareKeyListener(this PopupBase page, HardwareKeyListener listener) => RemoveHardwareKeyListener(page as VisualElement, listener);
/// <summary> /// Sets the HardwareKeyFocus to this page. /// </summary> /// <param name="page">Page.</param> public static void HardwareKeyFocus(this PopupBase page) => HardwareKeyFocus(page as VisualElement);
/// <summary> /// Matches a hardware key listener and, if found, removes it from this ContentPage. /// </summary> /// <param name="page">Forms9Patch.HardwareKeyPage.</param> /// <param name="keyInput">Key Label.</param> /// <param name="hardwareKeyModifierKeys">Hardware key modifier keys.</param> public static void RemoveHardwareKeyListener(this PopupBase page, string keyInput, HardwareKeyModifierKeys hardwareKeyModifierKeys = HardwareKeyModifierKeys.None) => RemoveHardwareKeyListener(page as VisualElement, keyInput, hardwareKeyModifierKeys);
/// <summary> /// Adds a hardware key listener to this ContentPage. /// </summary> /// <returns>The hardware key listener.</returns> /// <param name="page">Forms9Patch.HardwareKeyPage.</param> /// <param name="hardwareKeyListener">Hardware key listener.</param> public static HardwareKeyListener AddHardwareKeyListener(this PopupBase page, HardwareKeyListener hardwareKeyListener) => AddHardwareKeyListener(page as VisualElement, hardwareKeyListener);
/// <summary> /// Adds a hardware key listener to HardwareKeyPage. /// </summary> /// <returns>The hardware key listener.</returns> /// <param name="page">Page.</param> /// <param name="keyInput">Key input.</param> public static HardwareKeyListener AddHardwareKeyListener(this PopupBase page, string keyInput) => AddHardwareKeyListener(page as VisualElement, keyInput, HardwareKeyModifierKeys.None, null, null);
/// <summary> /// Adds a hardware key listener to a HardwareKeyPage. /// </summary> /// <returns>The hardware key listener.</returns> /// <param name="page">Page.</param> /// <param name="keyInput">Key input.</param> /// <param name="onPressed">On pressed.</param> public static HardwareKeyListener AddHardwareKeyListener(this PopupBase page, string keyInput, EventHandler <HardwareKeyEventArgs> onPressed) => AddHardwareKeyListener(page as VisualElement, keyInput, HardwareKeyModifierKeys.None, null, onPressed);
/// <summary> /// Adds a hardware key listener to a HardwareKeyPage. /// </summary> /// <returns>The hardware key listener.</returns> /// <param name="page">Page.</param> /// <param name="keyInput">Key input.</param> /// <param name="hardwareKeyModifierKeys">Hardware key modifier keys.</param> /// <param name="discoverableTitle">Discoverable title.</param> /// <param name="onPressed">On pressed.</param> public static HardwareKeyListener AddHardwareKeyListener(this PopupBase page, string keyInput, HardwareKeyModifierKeys hardwareKeyModifierKeys, string discoverableTitle, EventHandler <HardwareKeyEventArgs> onPressed = null) => AddHardwareKeyListener(page as VisualElement, keyInput, hardwareKeyModifierKeys, discoverableTitle, onPressed);