void OnFocusedChange(object?sender, FocusChangeEventArgs e)
 {
     if (!e.HasFocus)
     {
         VirtualView?.Completed();
     }
 }
 void OnFocusedChange(bool hasFocus)
 {
     if (!hasFocus)
     {
         VirtualView?.Completed();
     }
 }
Пример #3
0
        void OnEnded(object?sender, EventArgs eventArgs)
        {
            if (VirtualView != null)
            {
                VirtualView.IsFocused = false;

                VirtualView.Completed();
            }
        }
Пример #4
0
        void OnFocusedChange(bool hasFocus)
        {
            AnimatePlaceholder();

            if (!hasFocus)
            {
                VirtualView?.Completed();
            }
        }
Пример #5
0
        protected virtual bool OnShouldReturn(UITextField view)
        {
            view.ResignFirstResponder();

            // TODO: Focus next View

            VirtualView?.Completed();

            return(false);
        }
Пример #6
0
        void OnEditorAction(object?sender, EditorActionEventArgs e)
        {
            if (e.IsCompletedAction())
            {
                // TODO: Dismiss keyboard for hardware / physical keyboards

                VirtualView?.Completed();
            }

            e.Handled = true;
        }
Пример #7
0
        protected override MauiTextView CreatePlatformView()
        {
            var platformEditor = new MauiTextView();

#if !MACCATALYST
            platformEditor.InputAccessoryView = new MauiDoneAccessoryView(() =>
            {
                platformEditor.ResignFirstResponder();
                VirtualView?.Completed();
            });
#endif

            return(platformEditor);
        }
Пример #8
0
        void OnEnded(object?sender, EventArgs eventArgs)
        {
            if (VirtualView == null || NativeView == null)
            {
                return;
            }

            if (NativeView.Text != VirtualView.Text)
            {
                VirtualView.Text = NativeView.Text ?? string.Empty;
            }

            // TODO: Update IsFocused property
            VirtualView.Completed();
        }
Пример #9
0
        void OnNativeKeyUp(object?sender, KeyRoutedEventArgs args)
        {
            if (args?.Key != VirtualKey.Enter)
            {
                return;
            }

            if (VirtualView?.ReturnType == ReturnType.Next)
            {
                NativeView?.TryMoveFocus(FocusNavigationDirection.Next);
            }
            else
            {
                // TODO: Hide the soft keyboard; this matches the behavior of .NET MAUI on Android/iOS
            }

            VirtualView?.Completed();
        }
Пример #10
0
        void OnEnded(object?sender, EventArgs eventArgs)
        {
            Drawable.HasFocus = false;
            Invalidate();

            if (VirtualView == null || PlatformView == null)
            {
                return;
            }

            if (PlatformView.Text != VirtualView.Text)
            {
                VirtualView.Text = PlatformView.Text ?? string.Empty;
            }

            // TODO: Update IsFocused property

            VirtualView.Completed();
        }
Пример #11
0
 void OnLostFocus(object?sender, RoutedEventArgs e)
 {
     VirtualView?.Completed();
 }
Пример #12
0
 void OnEnded(object?sender, EventArgs eventArgs)
 {
     // TODO: Update IsFocused property
     VirtualView.Completed();
 }