示例#1
0
        public MUX_Test()
        {
            this.InitializeComponent();
#if HAS_UNO
            TestNumberBox.RegisterPropertyChangedCallback(NumberBox.TextProperty, new DependencyPropertyChangedCallback(TextPropertyChanged));
#endif
        }
示例#2
0
        private void InputScope_Changed(object sender, RoutedEventArgs e)
        {
            if (TestNumberBox != null &&
                sender is ComboBox comboBox &&
                comboBox.SelectedItem is ComboBoxItem item)
            {
                var scopeName = new InputScopeName();
                scopeName.NameValue = (InputScopeNameValue)Enum.Parse(typeof(InputScopeNameValue), item.Content?.ToString() ?? string.Empty, true);

                var scope = new InputScope();
                scope.Names.Add(scopeName);

                TestNumberBox.InputScope = scope;

                // Help testing by returning focus to the NumberBox to see the keyboard change
                TestNumberBox.Focus(/*FocusState.Keyboard*/);
            }
        }
示例#3
0
        public NumberBoxPage()
        {
            this.InitializeComponent();

            TestNumberBox.RegisterPropertyChangedCallback(NumberBox.TextProperty, new DependencyPropertyChangedCallback(TextPropertyChanged));
        }