Наследование: Windows.UI.Xaml.DependencyObject, IInputScopeName
Пример #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);
 }
Пример #2
0
        /// <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;
        }
Пример #3
0
        private void SetTextBoxToNumerics(TextBox textBox)
        {
            var scope = new InputScope();
            var name = new InputScopeName();

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

            textBox.InputScope = scope;
        }
Пример #4
0
        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;
        }
Пример #5
0
        // 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();
        }
Пример #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;
        }
Пример #7
0
 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;
 }