void UpdateInputScope() { if (_queryTextBox == null) { return; } InputView model = Element; if (model.Keyboard is CustomKeyboard custom) { _queryTextBox.IsTextPredictionEnabled = (custom.Flags & KeyboardFlags.Suggestions) != 0; _queryTextBox.IsSpellCheckEnabled = (custom.Flags & KeyboardFlags.Spellcheck) != 0; } else { _queryTextBox.ClearValue(TextBox.IsTextPredictionEnabledProperty); if (model.IsSet(InputView.IsSpellCheckEnabledProperty)) { _queryTextBox.IsSpellCheckEnabled = model.IsSpellCheckEnabled; } else { _queryTextBox.ClearValue(TextBox.IsSpellCheckEnabledProperty); } } _queryTextBox.InputScope = model.Keyboard.ToInputScope(); }
protected override void UpdateBackgroundColor() { if (_queryTextBox == null) { return; } Color backgroundColor = Element.BackgroundColor; if (!backgroundColor.IsDefault) { _queryTextBox.Background = backgroundColor.ToBrush(); } else { _queryTextBox.ClearValue(Windows.UI.Xaml.Controls.Control.BackgroundProperty); } }