Share via


RichEditBox.InputScope Property

Definition

Gets or sets the context for input used by this RichEditBox.

public:
 property InputScope ^ InputScope { InputScope ^ get(); void set(InputScope ^ value); };
InputScope InputScope();

void InputScope(InputScope value);
public InputScope InputScope { get; set; }
var inputScope = richEditBox.inputScope;
richEditBox.inputScope = inputScope;
Public Property InputScope As InputScope
<RichEditBox InputScope="inputScopeName" .../>
- or -
<RichEditBox>
  <RichEditBox.InputScope>
    <InputScope>
      <InputScope.Names>
        <InputScopeName NameValue="inputScopeName"/>
      </InputScope.Names>
    </InputScope>
  </RichEditBox.InputScope>
</RichEditBox>

Property Value

The input scope, which provides a hint at the type of text input expected by the control. The default is null.

Examples

Here's how to set the InputScope in XAML and in code.

<RichEditBox InputScope="Formula"/>
RichEditBox editBox = new RichEditBox();

InputScope scope = new InputScope();
InputScopeName scopeName = new InputScopeName();
scopeName.NameValue = InputScopeNameValue.Formula;
scope.Names.Add(scopeName);
editBox.InputScope = scope;

Remarks

The input scope provides a hint at the type of text input expected by the control. Various elements of the system can respond to the hint provided by the input scope and provide a specialized UI for the input type. For example, the soft keyboard might show a number pad for text input when the control has its InputScope set to Number. See the InputScopeNameValue enumeration for a complete list of input scope values.

The control might also interpret the data being entered differently (typically for East Asian related input scopes). The input scope does not perform any validation, and does not prevent the user from providing input through a hardware keyboard or other input device.

Important

While this property can hold a collection of InputScopeName values, in most cases only the first is used. The only exception to this is when Private is specified as a value. Private is never ignored, regardless of its location in the collection. If Private is the first item in the collection, the next item in the collection (if present) is also used.

Applies to

See also