# RichTextBlockProps

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-view/generated/builders/trait-richtextblockprops/

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

```rust
trait RichTextBlockProps: ElementBuilder
```

The properties and routed events of `RichTextBlock`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7155)

## Members

- [`rich_document`](#function-rich_document)
- [`selection_start`](#function-selection_start)
- [`selection_end`](#function-selection_end)
- [`is_text_selection_enabled`](#function-is_text_selection_enabled)
- [`selection_highlight_color`](#function-selection_highlight_color)
- [`selection_foreground_brush`](#function-selection_foreground_brush)
- [`caret_brush`](#function-caret_brush)
- [`background`](#function-background)
- [`padding`](#function-padding)
- [`font_family`](#function-font_family)
- [`font_size`](#function-font_size)
- [`font_style`](#function-font_style)
- [`font_weight`](#function-font_weight)
- [`font_stretch`](#function-font_stretch)
- [`font_features`](#function-font_features)
- [`foreground`](#function-foreground)
- [`letter_spacing`](#function-letter_spacing)
- [`text_alignment`](#function-text_alignment)
- [`line_height`](#function-line_height)
- [`text_indent`](#function-text_indent)
- [`line_stacking_strategy`](#function-line_stacking_strategy)
- [`text_line_bounds`](#function-text_line_bounds)
- [`text_decorations`](#function-text_decorations)
- [`text_trimming`](#function-text_trimming)
- [`text_wrapping`](#function-text_wrapping)
- [`max_lines`](#function-max_lines)
- [`on_selection_changed`](#function-on_selection_changed)
- [`on_is_text_trimmed_changed`](#function-on_is_text_trimmed_changed)
- [`on_context_menu_opening`](#function-on_context_menu_opening)

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

### rich_document

```rust
fn rich_document<M>(self: Self, value: impl IntoProp<ferroui_controls::documents::RichTextDocument, M>) -> Self
```

Sets `RichTextBlock::rich_document_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7157)

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

### selection_start

```rust
fn selection_start<M>(self: Self, value: impl IntoProp<i32, M>) -> Self
```

Sets `RichTextBlock::selection_start_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7162)

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

### selection_end

```rust
fn selection_end<M>(self: Self, value: impl IntoProp<i32, M>) -> Self
```

Sets `RichTextBlock::selection_end_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7167)

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

### is_text_selection_enabled

```rust
fn is_text_selection_enabled<M>(self: Self, value: impl IntoProp<bool, M>) -> Self
```

Sets `RichTextBlock::is_text_selection_enabled_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7172)

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

### selection_highlight_color

```rust
fn selection_highlight_color<M>(self: Self, value: impl IntoProp<Option<std::rc::Rc<dyn ferroui_base::media::IBrush>>, M>) -> Self
```

Sets `RichTextBlock::selection_highlight_color_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7177)

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

### selection_foreground_brush

```rust
fn selection_foreground_brush<M>(self: Self, value: impl IntoProp<Option<std::rc::Rc<dyn ferroui_base::media::IBrush>>, M>) -> Self
```

Sets `RichTextBlock::selection_foreground_brush_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7182)

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

### caret_brush

```rust
fn caret_brush<M>(self: Self, value: impl IntoProp<Option<std::rc::Rc<dyn ferroui_base::media::IBrush>>, M>) -> Self
```

Sets `RichTextBlock::caret_brush_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7187)

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

### background

```rust
fn background<M>(self: Self, value: impl IntoProp<Option<std::rc::Rc<dyn ferroui_base::media::IBrush>>, M>) -> Self
```

Sets `RichTextBlock::background_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7192)

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

### padding

```rust
fn padding<M>(self: Self, value: impl IntoProp<ferroui_base::Thickness, M>) -> Self
```

Sets `RichTextBlock::padding_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7197)

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

### font_family

```rust
fn font_family<M>(self: Self, value: impl IntoProp<ferroui_base::media::FontFamily, M>) -> Self
```

Sets `RichTextBlock::font_family_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7202)

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

### font_size

```rust
fn font_size<M>(self: Self, value: impl IntoProp<f64, M>) -> Self
```

Sets `RichTextBlock::font_size_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7207)

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

### font_style

```rust
fn font_style<M>(self: Self, value: impl IntoProp<ferroui_base::media::FontStyle, M>) -> Self
```

Sets `RichTextBlock::font_style_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7212)

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

### font_weight

```rust
fn font_weight<M>(self: Self, value: impl IntoProp<ferroui_base::media::FontWeight, M>) -> Self
```

Sets `RichTextBlock::font_weight_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7217)

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

### font_stretch

```rust
fn font_stretch<M>(self: Self, value: impl IntoProp<ferroui_base::media::FontStretch, M>) -> Self
```

Sets `RichTextBlock::font_stretch_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7222)

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

### font_features

```rust
fn font_features<M>(self: Self, value: impl IntoProp<Option<ferroui_base::media::FontFeatureCollection>, M>) -> Self
```

Sets `RichTextBlock::font_features_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7227)

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

### foreground

```rust
fn foreground<M>(self: Self, value: impl IntoProp<Option<std::rc::Rc<dyn ferroui_base::media::IBrush>>, M>) -> Self
```

Sets `RichTextBlock::foreground_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7232)

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

### letter_spacing

```rust
fn letter_spacing<M>(self: Self, value: impl IntoProp<f64, M>) -> Self
```

Sets `RichTextBlock::letter_spacing_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7237)

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

### text_alignment

```rust
fn text_alignment<M>(self: Self, value: impl IntoProp<ferroui_base::media::TextAlignment, M>) -> Self
```

Sets `RichTextBlock::text_alignment_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7242)

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

### line_height

```rust
fn line_height<M>(self: Self, value: impl IntoProp<f64, M>) -> Self
```

Sets `RichTextBlock::line_height_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7247)

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

### text_indent

```rust
fn text_indent<M>(self: Self, value: impl IntoProp<f64, M>) -> Self
```

Sets `RichTextBlock::text_indent_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7252)

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

### line_stacking_strategy

```rust
fn line_stacking_strategy<M>(self: Self, value: impl IntoProp<ferroui_controls::documents::LineStackingStrategy, M>) -> Self
```

Sets `RichTextBlock::line_stacking_strategy_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7257)

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

### text_line_bounds

```rust
fn text_line_bounds<M>(self: Self, value: impl IntoProp<ferroui_base::media::TextLineBounds, M>) -> Self
```

Sets `RichTextBlock::text_line_bounds_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7262)

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

### text_decorations

```rust
fn text_decorations<M>(self: Self, value: impl IntoProp<Option<ferroui_base::media::TextDecorationCollection>, M>) -> Self
```

Sets `RichTextBlock::text_decorations_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7267)

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

### text_trimming

```rust
fn text_trimming<M>(self: Self, value: impl IntoProp<std::rc::Rc<dyn ferroui_base::media::TextTrimming>, M>) -> Self
```

Sets `RichTextBlock::text_trimming_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7272)

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

### text_wrapping

```rust
fn text_wrapping<M>(self: Self, value: impl IntoProp<ferroui_base::media::TextWrapping, M>) -> Self
```

Sets `RichTextBlock::text_wrapping_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7277)

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

### max_lines

```rust
fn max_lines<M>(self: Self, value: impl IntoProp<i32, M>) -> Self
```

Sets `RichTextBlock::max_lines_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7282)

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

### on_selection_changed

```rust
fn on_selection_changed(self: Self, handler: impl Fn(&ferroui_base::interactivity::RoutedEventArgs) -> () + 'static) -> Self
```

Handles `RichTextBlock::selection_changed_event`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7287)

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

### on_is_text_trimmed_changed

```rust
fn on_is_text_trimmed_changed(self: Self, handler: impl Fn(&ferroui_base::interactivity::RoutedEventArgs) -> () + 'static) -> Self
```

Handles `RichTextBlock::is_text_trimmed_changed_event`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7292)

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

### on_context_menu_opening

```rust
fn on_context_menu_opening(self: Self, handler: impl Fn(&ferroui_controls::ContextMenuEventArgs) -> () + 'static) -> Self
```

Handles `RichTextBlock::context_menu_opening_event`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L7297)

## Trait implementations

- [`RichTextBlockProps`](/docs/0.5.0/api/ferroui-view/generated/builders/trait-richtextblockprops/)

## Availability

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