예제 #1
0
 void ShowKeyboard()
 {
     if (Element.ShowKeyboard)
     {
         UIHelper.OpenSoftKeyboard(Control);
     }
 }
예제 #2
0
        public bool OnEditorAction(TextView v, ImeAction actionId, KeyEvent e)
        {
            if (BaseElement.NextElement == null && (actionId == ImeAction.Done || actionId == ImeAction.Next))
            {
                UIHelper.CloseSoftKeyboard(Control);

                if (BaseElement.Command != null && BaseElement.Command.CanExecute(null))
                {
                    System.Windows.Input.ICommand cmd = BaseElement.Command;
                    cmd.Execute(null);
                }
                return(false);
            }

            if (actionId == ImeAction.Done || actionId == ImeAction.Next)
            {
                BaseElement.NextElement.Focus();
                UIHelper.OpenSoftKeyboard(Control);
                return(true);
            }



            return(false);
        }
예제 #3
0
        protected override void OnElementPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            base.OnElementPropertyChanged(sender, e);

            switch (e.PropertyName)
            {
            case "IsFocused":
                if (Element.IsFocused)
                {
                    SetTextAlignment();
                    UIHelper.OpenSoftKeyboard(Control);
                }
                break;

            case "FontSize":
            case "Font":
                SetTypeface();
                break;

            case "TextColor":
                SetTextColor();
                break;

            case "Text":
                SetText();
                break;

            case "IsPassword":
                if (Element.IsPassword)
                {
                    Control.InputType           |= InputTypes.TextVariationPassword;
                    Control.TransformationMethod = new HiddenPasswordTransformationMethod();
                }
                else
                {
                    Control.TransformationMethod = null;
                }
                break;

            case "TextInputType":
                SetTextInputTypes();
                break;

            case "Placeholder":
                SetHint();
                break;

            case "IsEnabled":
                //CheckEnabled();
                break;
            }
        }
예제 #4
0
        public bool OnEditorAction(TextView v, ImeAction actionId, KeyEvent e)
        {
            if (Element.NextElement == null && (actionId == ImeAction.Done || actionId == ImeAction.Next))
            {
                UIHelper.CloseSoftKeyboard(Control);

                if (Element.Command != null && Element.Command.CanExecute(Element.CommandParameter))
                {
                    Element.Command.Execute(Element.CommandParameter);
                }
                return(false);
            }

            if (actionId == ImeAction.Done || actionId == ImeAction.Next)
            {
                Element.NextElement.Focus();
                UIHelper.OpenSoftKeyboard(Control);
                return(true);
            }

            return(false);
        }