コード例 #1
0
 void OnFocusedChange(object?sender, FocusChangeEventArgs e)
 {
     if (!e.HasFocus)
     {
         VirtualView?.Completed();
     }
 }
コード例 #2
0
 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
ファイル: EntryHandler.iOS.cs プロジェクト: ChaseRoth/maui
        protected virtual bool OnShouldReturn(UITextField view)
        {
            view.ResignFirstResponder();

            // TODO: Focus next View

            VirtualView?.Completed();

            return(false);
        }
コード例 #6
0
ファイル: EntryHandler.Android.cs プロジェクト: hevey/maui
        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
ファイル: EditorHandler.iOS.cs プロジェクト: jrockhub/maui
        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();
 }