void HandleKeyUp(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         CustomReturnEffect.GetReturnCommand(Element)?.Execute(CustomReturnEffect.GetReturnCommandParameter(Element));
     }
 }
        void HandleKeyPress(object sender, global::Android.Views.View.KeyEventArgs e)
        {
            if (e?.Event?.KeyCode == Keycode.Enter && e?.Event?.Action == KeyEventActions.Up)
            {
                CustomReturnEffect.GetReturnCommand(Element)?.Execute(CustomReturnEffect.GetReturnCommandParameter(Element));
            }

            e.Handled = false;
        }
        void HandleEditorAction(object sender, TextView.EditorActionEventArgs e)
        {
            if (e?.Event?.KeyCode == Keycode.Enter)
            {
                return;
            }

            CustomReturnEffect.GetReturnCommand(Element)?.Execute(CustomReturnEffect.GetReturnCommandParameter(Element));
        }
Пример #4
0
        void ExecuteCommand()
        {
            var returnCommand          = CustomReturnEffect.GetReturnCommand(Element);
            var returnCommandParameter = CustomReturnEffect.GetReturnCommandParameter(Element);

            var canExecute = returnCommand?.CanExecute(returnCommandParameter) ?? true;

            if (canExecute)
            {
                returnCommand?.Execute(returnCommandParameter);
            }
        }
        bool HandleShouldReturn(UITextField textField)
        {
            var returnCommand          = CustomReturnEffect.GetReturnCommand(Element);
            var returnCommandParameter = CustomReturnEffect.GetReturnCommandParameter(Element);

            var canExecute = returnCommand?.CanExecute(returnCommandParameter) ?? true;

            if (canExecute)
            {
                returnCommand?.Execute(returnCommandParameter);

                return(true);
            }

            return(false);
        }
Пример #6
0
 bool HandleShouldReturn(UITextField textField)
 {
     CustomReturnEffect.GetReturnCommand(Element)?.Execute(CustomReturnEffect.GetReturnCommandParameter(Element));
     return(true);
 }