Inheritance: Windows.UI.Xaml.DependencyObject, IInputScopeName
Exemple #1
0
 private void anInputScopeComboBoxes_SelectionChanged_1(object sender, SelectionChangedEventArgs e)
 {
     InputScope scope = new InputScope();
     InputScopeName scopeName = new InputScopeName { NameValue = (InputScopeNameValue)(inputScopeValues[e.AddedItems.First().ToString()]) };
     scope.Names.Add(scopeName);
     aBigTextBox.InputScope = scope;
     aBigTextBox.Focus(FocusState.Keyboard);
 }
        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.  The Parameter
        /// property is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            InputScope scope = new InputScope();
            InputScopeName name = new InputScopeName();

            name.NameValue = InputScopeNameValue.Number;
            scope.Names.Add(name);

            textBox1.InputScope = scope;
        }
        private void SetTextBoxToNumerics(TextBox textBox)
        {
            var scope = new InputScope();
            var name = new InputScopeName();

            name.NameValue = InputScopeNameValue.Number;
            scope.Names.Add(name);

            textBox.InputScope = scope;
        }
        public MainPage()
        {
            this.InitializeComponent();
            this.NavigationCacheMode = NavigationCacheMode.Required;

            InputScope scope = new InputScope();
            InputScopeName name = new InputScopeName();
            name.NameValue = InputScopeNameValue.Number;
            scope.Names.Add(name);
            txtDigita.InputScope = scope;
        }
        // Constructors
        public NumberBox()
        {
            KeyDown += new KeyEventHandler(OnKeyDown);
            TextChanged += new TextChangedEventHandler(OnTextChanged);

            InputScopeName name = new InputScopeName();
            name.NameValue = InputScopeNameValue.Number;
            InputScope scope = new InputScope();
            scope.Names.Add(name);

            InputScope = scope;

            Refresh();
        }
Exemple #6
0
        public NumericTextBox()
        {
            KeyDown += KeyDownHandler;

            var scope = new InputScope();
            var name = new InputScopeName
            {
                NameValue = InputScopeNameValue.Number
            };

            scope.Names.Add(name);

            InputScope = scope;

            LostFocus += LostFocusHandler;
        }
 private void addInputType(TextBox field, SupportedWidgets widgetType)
 {
     InputScope scope = new InputScope();
     InputScopeName name = new InputScopeName();
     //textfield or password
     if (widgetType.Equals(SupportedWidgets.TEXTFIELD))
     {
         name.NameValue = InputScopeNameValue.Default;
     }
     else if (widgetType.Equals(SupportedWidgets.NUMBERFIELD) || widgetType.Equals(SupportedWidgets.NUMBERDOUBLEFIELD))
     {
         name.NameValue = InputScopeNameValue.Number;
     }
     scope.Names.Add(name);
     field.InputScope = scope;
 }
 private void setConstraint(TextBox tb, InputScopeNameValue v) {
     InputScope ins = new InputScope();
     InputScopeName insane = new InputScopeName();
     insane.NameValue = v;
     ins.Names.Add(insane);
     tb.InputScope = ins;
 }