# TextInputOptions

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/input/text_input/struct-textinputoptions/

**struct** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
struct TextInputOptions
```

Describes how a text input wants the input method of the platform to
behave: the properties are attached to a text editing control (they are
inherited) and gathered into a `TextInputOptions` value for the input
method.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L11)

## Members

- [`content_type`](#struct_field-content_type)
- [`return_key_type`](#struct_field-return_key_type)
- [`multiline`](#struct_field-multiline)
- [`lowercase`](#struct_field-lowercase)
- [`uppercase`](#struct_field-uppercase)
- [`auto_capitalization`](#struct_field-auto_capitalization)
- [`is_sensitive`](#struct_field-is_sensitive)
- [`show_suggestions`](#struct_field-show_suggestions)
- [`locale_hints`](#struct_field-locale_hints)
- [`TYPE`](#assoc_const-type)
- [`from_styled_element`](#function-from_styled_element)
- [`default_options`](#function-default_options)
- [`input_scope_names_property`](#function-input_scope_names_property)
- [`set_input_scope_names`](#function-set_input_scope_names)
- [`get_input_scope_names`](#function-get_input_scope_names)
- [`get_effective_input_scope`](#function-get_effective_input_scope)
- [`get_effective_content_type`](#function-get_effective_content_type)
- [`content_type_property`](#function-content_type_property)
- [`set_content_type`](#function-set_content_type)
- [`get_content_type`](#function-get_content_type)
- [`return_key_type_property`](#function-return_key_type_property)
- [`set_return_key_type`](#function-set_return_key_type)
- [`get_return_key_type`](#function-get_return_key_type)
- [`multiline_property`](#function-multiline_property)
- [`set_multiline`](#function-set_multiline)
- [`get_multiline`](#function-get_multiline)
- [`lowercase_property`](#function-lowercase_property)
- [`set_lowercase`](#function-set_lowercase)
- [`get_lowercase`](#function-get_lowercase)
- [`uppercase_property`](#function-uppercase_property)
- [`set_uppercase`](#function-set_uppercase)
- [`get_uppercase`](#function-get_uppercase)
- [`auto_capitalization_property`](#function-auto_capitalization_property)
- [`set_auto_capitalization`](#function-set_auto_capitalization)
- [`get_auto_capitalization`](#function-get_auto_capitalization)
- [`is_sensitive_property`](#function-is_sensitive_property)
- [`set_is_sensitive`](#function-set_is_sensitive)
- [`get_is_sensitive`](#function-get_is_sensitive)
- [`show_suggestions_property`](#function-show_suggestions_property)
- [`set_show_suggestions`](#function-set_show_suggestions)
- [`get_show_suggestions`](#function-get_show_suggestions)
- [`locale_hints_property`](#function-locale_hints_property)
- [`set_locale_hints`](#function-set_locale_hints)
- [`get_locale_hints`](#function-get_locale_hints)

<a id="struct_field-content_type"></a>

### content_type

```rust
content_type: super::TextInputContentType
```

The content type (mostly for determining the shape of the virtual keyboard).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L13)

<a id="struct_field-return_key_type"></a>

### return_key_type

```rust
return_key_type: super::TextInputReturnKeyType
```

Determines what the Return key says and how it behaves.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L16)

<a id="struct_field-multiline"></a>

### multiline

```rust
multiline: bool
```

Text is multiline.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L19)

<a id="struct_field-lowercase"></a>

### lowercase

```rust
lowercase: bool
```

Text is in lower case.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L22)

<a id="struct_field-uppercase"></a>

### uppercase

```rust
uppercase: bool
```

Text is in upper case.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L25)

<a id="struct_field-auto_capitalization"></a>

### auto_capitalization

```rust
auto_capitalization: bool
```

Automatically capitalize letters at the start of the sentence.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L28)

<a id="struct_field-is_sensitive"></a>

### is_sensitive

```rust
is_sensitive: bool
```

Text contains sensitive data like card numbers and should not be stored.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L31)

<a id="struct_field-show_suggestions"></a>

### show_suggestions

```rust
show_suggestions: Option<bool>
```

Determines whether text suggestions are shown; `None` leaves the decision to the platform.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L34)

<a id="struct_field-locale_hints"></a>

### locale_hints

```rust
locale_hints: Option<std::rc::Rc<[String]>>
```

Hints about the locales (BCP 47 language tags) the user is expected to type in.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L37)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L40)

<a id="function-from_styled_element"></a>

### from_styled_element

```rust
fn from_styled_element(ferro_object: &StyledElement) -> TextInputOptions
```

Creates the options from the values of the attached properties of a
control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L60)

<a id="function-default_options"></a>

### default_options

```rust
fn default_options() -> TextInputOptions
```

The default options.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L75)

<a id="function-input_scope_names_property"></a>

### input_scope_names_property

```rust
fn input_scope_names_property() -> &'static AttachedProperty<Option<Rc<[InputScopeNameValue]>>>
```

Defines the `InputScopeNames` attached property: the ordered, immutable input-scope
hints of WinUI's `InputScope` (an addition, `docs/porting/winui-rich-text.md`). `None`
or an empty list leaves the input method to `ContentType`.

Within 0.4 the value is not a field of `TextInputOptions`: a backend reads it from
the element, through `TextInputMethodConnection::input_scope_names`
of a client that opted in to the connection.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L79)

<a id="function-set_input_scope_names"></a>

### set_input_scope_names

```rust
fn set_input_scope_names(ferro_object: &StyledElement, value: Option<Rc<[InputScopeNameValue]>>)
```

Sets the value of the attached `InputScopeNames` property on a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L96)

<a id="function-get_input_scope_names"></a>

### get_input_scope_names

```rust
fn get_input_scope_names(ferro_object: &StyledElement) -> Option<Rc<[InputScopeNameValue]>>
```

Gets the value of the attached `InputScopeNames` property of a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L101)

<a id="function-get_effective_input_scope"></a>

### get_effective_input_scope

```rust
fn get_effective_input_scope(ferro_object: &StyledElement) -> Option<InputScopeNameValue>
```

The first input scope of a control, the one a platform with a single hint uses.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L106)

<a id="function-get_effective_content_type"></a>

### get_effective_content_type

```rust
fn get_effective_content_type(ferro_object: &StyledElement) -> TextInputContentType
```

The content type that best matches the first input scope of a control, or its
`ContentType` without one: for a platform that has content types and no input scopes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L112)

<a id="function-content_type_property"></a>

### content_type_property

```rust
fn content_type_property() -> &'static AttachedProperty<TextInputContentType>
```

Defines the `ContentType` attached property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L117)

<a id="function-set_content_type"></a>

### set_content_type

```rust
fn set_content_type(ferro_object: &StyledElement, value: TextInputContentType)
```

Sets the value of the attached `ContentType` property on a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L128)

<a id="function-get_content_type"></a>

### get_content_type

```rust
fn get_content_type(ferro_object: &StyledElement) -> TextInputContentType
```

Gets the value of the attached `ContentType` property of a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L133)

<a id="function-return_key_type_property"></a>

### return_key_type_property

```rust
fn return_key_type_property() -> &'static AttachedProperty<TextInputReturnKeyType>
```

Defines the `ReturnKeyType` attached property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L137)

<a id="function-set_return_key_type"></a>

### set_return_key_type

```rust
fn set_return_key_type(ferro_object: &StyledElement, value: TextInputReturnKeyType)
```

Sets the value of the attached `ReturnKeyType` property on a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L148)

<a id="function-get_return_key_type"></a>

### get_return_key_type

```rust
fn get_return_key_type(ferro_object: &StyledElement) -> TextInputReturnKeyType
```

Gets the value of the attached `ReturnKeyType` property of a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L153)

<a id="function-multiline_property"></a>

### multiline_property

```rust
fn multiline_property() -> &'static AttachedProperty<bool>
```

Defines the `Multiline` attached property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L157)

<a id="function-set_multiline"></a>

### set_multiline

```rust
fn set_multiline(ferro_object: &StyledElement, value: bool)
```

Sets the value of the attached `Multiline` property on a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L168)

<a id="function-get_multiline"></a>

### get_multiline

```rust
fn get_multiline(ferro_object: &StyledElement) -> bool
```

Gets the value of the attached `Multiline` property of a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L173)

<a id="function-lowercase_property"></a>

### lowercase_property

```rust
fn lowercase_property() -> &'static AttachedProperty<bool>
```

Defines the `Lowercase` attached property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L177)

<a id="function-set_lowercase"></a>

### set_lowercase

```rust
fn set_lowercase(ferro_object: &StyledElement, value: bool)
```

Sets the value of the attached `Lowercase` property on a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L188)

<a id="function-get_lowercase"></a>

### get_lowercase

```rust
fn get_lowercase(ferro_object: &StyledElement) -> bool
```

Gets the value of the attached `Lowercase` property of a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L193)

<a id="function-uppercase_property"></a>

### uppercase_property

```rust
fn uppercase_property() -> &'static AttachedProperty<bool>
```

Defines the `Uppercase` attached property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L197)

<a id="function-set_uppercase"></a>

### set_uppercase

```rust
fn set_uppercase(ferro_object: &StyledElement, value: bool)
```

Sets the value of the attached `Uppercase` property on a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L208)

<a id="function-get_uppercase"></a>

### get_uppercase

```rust
fn get_uppercase(ferro_object: &StyledElement) -> bool
```

Gets the value of the attached `Uppercase` property of a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L213)

<a id="function-auto_capitalization_property"></a>

### auto_capitalization_property

```rust
fn auto_capitalization_property() -> &'static AttachedProperty<bool>
```

Defines the `AutoCapitalization` attached property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L217)

<a id="function-set_auto_capitalization"></a>

### set_auto_capitalization

```rust
fn set_auto_capitalization(ferro_object: &StyledElement, value: bool)
```

Sets the value of the attached `AutoCapitalization` property on a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L228)

<a id="function-get_auto_capitalization"></a>

### get_auto_capitalization

```rust
fn get_auto_capitalization(ferro_object: &StyledElement) -> bool
```

Gets the value of the attached `AutoCapitalization` property of a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L233)

<a id="function-is_sensitive_property"></a>

### is_sensitive_property

```rust
fn is_sensitive_property() -> &'static AttachedProperty<bool>
```

Defines the `IsSensitive` attached property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L237)

<a id="function-set_is_sensitive"></a>

### set_is_sensitive

```rust
fn set_is_sensitive(ferro_object: &StyledElement, value: bool)
```

Sets the value of the attached `IsSensitive` property on a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L248)

<a id="function-get_is_sensitive"></a>

### get_is_sensitive

```rust
fn get_is_sensitive(ferro_object: &StyledElement) -> bool
```

Gets the value of the attached `IsSensitive` property of a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L253)

<a id="function-show_suggestions_property"></a>

### show_suggestions_property

```rust
fn show_suggestions_property() -> &'static AttachedProperty<Option<bool>>
```

Defines the `ShowSuggestions` attached property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L257)

<a id="function-set_show_suggestions"></a>

### set_show_suggestions

```rust
fn set_show_suggestions(ferro_object: &StyledElement, value: Option<bool>)
```

Sets the value of the attached `ShowSuggestions` property on a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L268)

<a id="function-get_show_suggestions"></a>

### get_show_suggestions

```rust
fn get_show_suggestions(ferro_object: &StyledElement) -> Option<bool>
```

Gets the value of the attached `ShowSuggestions` property of a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L273)

<a id="function-locale_hints_property"></a>

### locale_hints_property

```rust
fn locale_hints_property() -> &'static AttachedProperty<Option<Rc<[String]>>>
```

Defines the `LocaleHints` attached property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L277)

<a id="function-set_locale_hints"></a>

### set_locale_hints

```rust
fn set_locale_hints(ferro_object: &StyledElement, value: Option<Rc<[String]>>)
```

Sets the value of the attached `LocaleHints` property on a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L288)

<a id="function-get_locale_hints"></a>

### get_locale_hints

```rust
fn get_locale_hints(ferro_object: &StyledElement) -> Option<Rc<[String]>>
```

Gets the value of the attached `LocaleHints` property of a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/text_input/text_input_options.rs#L293)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
