How to add a Done button to UWP soft numeric and telephone keypads?

JohnHardmanJohnHardman GBUniversity mod

Is there any way of adding a Done button to the soft numeric and telephone keyboards on UWP? I'm thinking of something similar to what others have done for iOS, where Done appears in the bar (where the microphone symbols appears on UWP) above the keypad.

I don't really want to implement keyboards from scratch using a collection of buttons. Extending the existing keyboards would be preferable.

Answers

  • JohnHardmanJohnHardman GBUniversity mod

    I haven't found a solution that works the way I would like it to. In the meantime, I'm using an EntryRenderer on UWP that changes the InputScope as follows:

    InputScope inputScope = new InputScope();
    inputScope.Names.Add(new InputScopeName
    {
        NameValue = InputScopeNameValue.CurrencyAmountAndSymbol
    });
    nativeTextField.InputScope = inputScope;
    nativeTextField.AcceptsReturn = false;
    nativeTextField.IsSpellCheckEnabled = false;
    nativeTextField.IsTextPredictionEnabled = false;
    

    That at least starts off with the numeric keys visible on the soft keyboard, whilst also allowing Return to fire the Completed event in XF.

    Thankfully, I already have validation in place on the Xamarin.Forms Entry, so if the user hits any keys other than the ones I want them to hit, the validation will kick in.

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    @JohnHardman

    It is not possible to customize the soft keyboard in UWP.

Sign In or Register to comment.