예제 #1
0
 void UnsetKeyboardReturnButton()
 {
     if (Control is FormsTextBox formsTextBox)
     {
         KeyboardHelpers.SetKeyboardEnterButton(formsTextBox, ReturnType.Default);
         Control.KeyUp -= HandleKeyUp;
     }
 }
예제 #2
0
 void SetKeyboardReturnButton()
 {
     if (Control is FormsTextBox formsTextBox)
     {
         KeyboardHelpers.SetKeyboardEnterButton(formsTextBox, CustomReturnEffect.GetReturnType(Element));
         Control.KeyUp += HandleKeyUp;
     }
 }
 void UnsetKeyboardReturnButton()
 {
     switch (Control)
     {
     case FormsTextBox formsTextBox:
         KeyboardHelpers.SetKeyboardEnterButton(formsTextBox, ReturnType.Default);
         Control.KeyUp -= HandleKeyUp;
         break;
     }
 }
 void SetKeyboardReturnButton()
 {
     switch (Control)
     {
     case FormsTextBox formsTextBox:
         KeyboardHelpers.SetKeyboardEnterButton(formsTextBox, CustomReturnEffect.GetReturnType(Element));
         Control.KeyUp += HandleKeyUp;
         break;
     }
 }
        protected override void OnElementChanged(ElementChangedEventArgs <Entry> e)
        {
            base.OnElementChanged(e);

            if (Control != null && Element is CustomReturnEntry customEntry)
            {
                KeyboardHelpers.SetKeyboardEnterButton(Control, customEntry.ReturnType);

                Control.KeyUp += HandleControlKeyUp;
            }
        }
        void UnsetKeyboardReturnButton()
        {
            var customControl = Control as FormsTextBox;

            if (customControl == null)
            {
                return;
            }

            KeyboardHelpers.SetKeyboardEnterButton(customControl, ReturnType.Default);
            Control.KeyUp -= HandleKeyUp;
        }
        void SetKeyboardReturnButton()
        {
            var customControl = Control as FormsTextBox;

            if (customControl == null)
            {
                return;
            }

            KeyboardHelpers.SetKeyboardEnterButton(customControl, CustomReturnEffect.GetReturnType(Element));
            Control.KeyUp += HandleKeyUp;
        }
        protected override void OnElementPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            base.OnElementPropertyChanged(sender, e);

            if (e.PropertyName.Equals(CustomReturnEntry.ReturnTypeProperty.PropertyName))
            {
                if (Control != null && sender is CustomReturnEntry customEntry)
                {
                    KeyboardHelpers.SetKeyboardEnterButton(Control, customEntry.ReturnType);
                }
            }
        }
        protected override void OnElementChanged(ElementChangedEventArgs <Entry> e)
        {
            base.OnElementChanged(e);

            var customEntry = Element as CustomReturnEntry;


            if (Control != null && customEntry != null)
            {
                KeyboardHelpers.SetKeyboardEnterButton(Control, customEntry.ReturnType);

                Control.KeyUp += (sender, eventArgs) =>
                {
                    if (eventArgs.Key == Windows.System.VirtualKey.Enter)
                    {
                        customEntry.ReturnCommand?.Execute(null);
                    }
                };
            }
        }