Displays document-like structured rich text.
When to use it
Section titled “When to use it”Use for paragraphs and inlines beyond simple labels.
Behavior
Section titled “Behavior”Displays paragraphs, nested spans, hyperlinks and embedded controls. All text indices are UTF-16 code units, matching the shaping and input-method contracts.
XAML and inheritance
Section titled “XAML and inheritance”Rust path: ferroui_controls::RichTextBlock. XAML namespace: FerroUI.Controls.
Base type: Control. Its layout, input, and styling behavior also applies.
The content property is Blocks; unnamed child content is assigned there.
Registered properties
Section titled “Registered properties”| Property | Rust value type | Declared by | Behavior | Default binding |
|---|---|---|---|---|
ActualThemeVariant |
core::option::Option<ferroui_base::styling::theme_variant::ThemeVariant> |
StyledElement | Styled, Inherited value | OneWay |
AllowFocusOnInteraction |
bool |
InputElement | Styled, Inherited value | OneWay |
AutoSafeAreaPadding |
bool |
TopLevel | Attached, Styled | OneWay |
Background |
core::option::Option<alloc::rc::Rc<dyn ferroui_base::media::i_brush::IBrush>> |
Border | Styled | OneWay |
BaselineOffset |
f64 |
RichTextBlock | Read-only, Direct | OneWay |
BetweenShowDelay |
i32 |
ToolTip | Attached, Styled | OneWay |
Bounds |
ferroui_base::rect::Rect |
Visual | Read-only, Direct | OneWay |
CacheMode |
core::option::Option<ferroui_base::type_system::Ref<ferroui_base::media::cache_mode::CacheMode>> |
Visual | Styled | OneWay |
CaretBrush |
core::option::Option<alloc::rc::Rc<dyn ferroui_base::media::i_brush::IBrush>> |
RichTextBlock | Styled | OneWay |
Clip |
core::option::Option<ferroui_base::type_system::Ref<ferroui_base::media::geometry::Geometry>> |
Visual | Styled | OneWay |
ClipToBounds |
bool |
Visual | Styled | OneWay |
Clock |
core::option::Option<alloc::rc::Rc<dyn ferroui_base::animation::i_clock::IClock>> |
Animatable | Styled, Inherited value | OneWay |
ContextFlyout |
core::option::Option<ferroui_base::type_system::Ref<ferroui_controls::flyouts::flyout_base::FlyoutBase>> |
Control | Styled | OneWay |
ContextMenu |
core::option::Option<ferroui_base::type_system::Ref<ferroui_controls::context_menu::ContextMenu>> |
Control | Styled | OneWay |
Cursor |
core::option::Option<alloc::rc::Rc<ferroui_base::input::cursor::Cursor>> |
InputElement | Styled, Inherited value | OneWay |
CustomPopupPlacementCallback |
core::option::Option<ferroui_controls::primitives::popup::CustomPopupPlacementCallbackValue> |
ToolTip | Attached, Styled | OneWay |
DataContext |
core::option::Option<alloc::rc::Rc<dyn ferroui_base::ferro_property::AnyValue>> |
StyledElement | Styled, Inherited value | OneWay |
DesiredSize |
ferroui_base::size::Size |
Layoutable | Read-only, Direct | OneWay |
Effect |
core::option::Option<alloc::rc::Rc<dyn ferroui_base::media::effects::i_effect::IEffect>> |
Visual | Styled | OneWay |
FeedbackType |
ferroui_controls::platform::i_platform_feedback::FeedbackType |
PlatformFeedback | Attached, Styled | OneWay |
FlowDirection |
ferroui_base::media::flow_direction::FlowDirection |
Visual | Attached, Styled, Inherited value | OneWay |
FocusAdorner |
core::option::Option<alloc::rc::Rc<dyn ferroui_controls::templates::i_template::ITemplateOf<core::option::Option<ferroui_base::type_system::Ref<ferroui_controls::control::Control>>>>> |
Control | Styled | OneWay |
Focusable |
bool |
InputElement | Styled | OneWay |
FontFamily |
ferroui_base::media::font_family::FontFamily |
TextElement | Attached, Styled, Inherited value | OneWay |
FontFeatures |
core::option::Option<ferroui_base::media::font_feature_collection::FontFeatureCollection> |
TextElement | Attached, Styled, Inherited value | OneWay |
FontSize |
f64 |
TextElement | Attached, Styled, Inherited value | OneWay |
FontStretch |
ferroui_base::media::font_stretch::FontStretch |
TextElement | Attached, Styled, Inherited value | OneWay |
FontStyle |
ferroui_base::media::font_style::FontStyle |
TextElement | Attached, Styled, Inherited value | OneWay |
FontWeight |
ferroui_base::media::font_weight::FontWeight |
TextElement | Attached, Styled, Inherited value | OneWay |
Foreground |
core::option::Option<alloc::rc::Rc<dyn ferroui_base::media::i_brush::IBrush>> |
TextElement | Attached, Styled, Inherited value | OneWay |
HasMirrorTransform |
bool |
Visual | Read-only, Direct | OneWay |
HasOverflowContent |
bool |
RichTextBlock | Read-only, Direct | OneWay |
Height |
f64 |
Layoutable | Styled | OneWay |
HorizontalAlignment |
ferroui_base::layout::layoutable::HorizontalAlignment |
Layoutable | Styled | OneWay |
HorizontalOffset |
f64 |
ToolTip | Attached, Styled | OneWay |
HotKey |
core::option::Option<ferroui_base::input::key_gesture::KeyGesture> |
HotKeyManager | Attached, Styled | OneWay |
IsEffectivelyEnabled |
bool |
InputElement | Read-only, Direct | OneWay |
IsEnabled |
bool |
InputElement | Styled | OneWay |
IsFocused |
bool |
InputElement | Read-only, Direct | OneWay |
IsHitTestVisible |
bool |
InputElement | Styled | OneWay |
IsHoldWithMouseEnabled |
bool |
InputElement | Attached, Styled | OneWay |
IsHoldingEnabled |
bool |
InputElement | Attached, Styled | OneWay |
IsKeyboardFocusWithin |
bool |
InputElement | Read-only, Direct | OneWay |
IsOpen |
bool |
ToolTip | Attached, Styled | OneWay |
IsPointerOver |
bool |
InputElement | Read-only, Direct | OneWay |
IsTabStop |
bool |
KeyboardNavigation | Attached, Styled | OneWay |
IsTemplateFocusTarget |
bool |
TemplatedControl | Attached, Styled | OneWay |
IsTextSelectionEnabled |
bool |
RichTextBlock | Styled | OneWay |
IsTextTrimmed |
bool |
RichTextBlock | Read-only, Direct | OneWay |
IsVisible |
bool |
Visual | Styled | OneWay |
Language |
icu_locale_core::locale::Locale |
TextElement | Attached, Styled, Inherited value | OneWay |
LayoutRoundingPlacement |
ferroui_controls::text_layout_rounding_placement::TextLayoutRoundingPlacement |
TextBlock | Attached, Styled, Inherited value | OneWay |
LetterSpacing |
f64 |
TextElement | Attached, Styled, Inherited value | OneWay |
LineHeight |
f64 |
TextBlock | Attached, Styled, Inherited value | OneWay |
LineSpacing |
f64 |
TextBlock | Attached, Styled, Inherited value | OneWay |
LineStackingStrategy |
ferroui_controls::documents::block::LineStackingStrategy |
Block | Styled, Inherited value | OneWay |
Margin |
ferroui_base::thickness::Thickness |
Layoutable | Styled | OneWay |
MaxHeight |
f64 |
Layoutable | Styled | OneWay |
MaxLines |
i32 |
RichTextBlock | Styled | OneWay |
MaxWidth |
f64 |
Layoutable | Styled | OneWay |
MinHeight |
f64 |
Layoutable | Styled | OneWay |
MinWidth |
f64 |
Layoutable | Styled | OneWay |
Name |
core::option::Option<alloc::string::String> |
StyledElement | Direct | OneWay |
NonClientHitTestResult |
ferroui_controls::platform::win32_properties::Win32HitTestValue |
Win32Properties | Attached, Styled, Inherited value | OneWay |
Opacity |
f64 |
Visual | Styled | OneWay |
OpacityMask |
core::option::Option<alloc::rc::Rc<dyn ferroui_base::media::i_brush::IBrush>> |
Visual | Styled | OneWay |
OverflowContentTarget |
core::option::Option<ferroui_base::element_ref::ElementRef<ferroui_controls::rich_text_block_overflow::RichTextBlockOverflow>> |
RichTextBlock | Styled | OneWay |
Padding |
ferroui_base::thickness::Thickness |
Decorator | Styled | OneWay |
Parent |
core::option::Option<ferroui_base::type_system::Ref<ferroui_base::styled_element::StyledElement>> |
StyledElement | Read-only, Direct | OneWay |
Placement |
ferroui_controls::placement_mode::PlacementMode |
ToolTip | Attached, Styled | OneWay |
QueryProvider |
core::option::Option<ferroui_base::styling::visual_query_provider::VisualQueryProvider> |
Container | Attached, Styled | OneWay |
RenderTransform |
core::option::Option<alloc::rc::Rc<dyn ferroui_base::media::i_transform::ITransform>> |
Visual | Styled | OneWay |
RenderTransformOrigin |
ferroui_base::relative_point::RelativePoint |
Visual | Styled | OneWay |
RequestedThemeVariant |
core::option::Option<ferroui_base::styling::theme_variant::ThemeVariant> |
StyledElement | Styled | OneWay |
RichDocument |
ferroui_controls::documents::rich_text_document::RichTextDocument |
RichTextBlock | Direct | OneWay |
SelectedText |
alloc::string::String |
RichTextBlock | Read-only, Direct | OneWay |
SelectionEnd |
i32 |
RichTextBlock | Direct | OneWay |
SelectionForegroundBrush |
core::option::Option<alloc::rc::Rc<dyn ferroui_base::media::i_brush::IBrush>> |
TextBox | Styled | OneWay |
SelectionHighlightColor |
core::option::Option<alloc::rc::Rc<dyn ferroui_base::media::i_brush::IBrush>> |
RichTextBlock | Styled | OneWay |
SelectionStart |
i32 |
RichTextBlock | Direct | OneWay |
ServiceEnabled |
bool |
ToolTip | Attached, Styled, Inherited value | OneWay |
Shadow |
core::option::Option<ferroui_base::type_system::Ref<ferroui_base::media::theme_shadow::Shadow>> |
Visual | Styled | OneWay |
ShouldUseOverlayLayer |
bool |
ToolTip | Attached, Styled | OneWay |
ShowDelay |
i32 |
ToolTip | Attached, Styled | OneWay |
ShowOnDisabled |
bool |
ToolTip | Attached, Styled, Inherited value | OneWay |
Sizing |
ferroui_base::styling::container_sizing::ContainerSizing |
Container | Attached, Styled | OneWay |
SystemBarColor |
core::option::Option<ferroui_base::type_system::Ref<ferroui_base::media::solid_color_brush::SolidColorBrush>> |
TopLevel | Attached, Styled, Inherited value | OneWay |
TabIndex |
i32 |
KeyboardNavigation | Attached, Styled | OneWay |
TabNavigation |
ferroui_base::input::keyboard_navigation_mode::KeyboardNavigationMode |
KeyboardNavigation | Attached, Styled | OneWay |
TabOnceActiveElement |
core::option::Option<ferroui_base::type_system::Ref<ferroui_base::input::input_element::InputElement>> |
KeyboardNavigation | Attached, Styled | OneWay |
Tag |
core::option::Option<alloc::rc::Rc<dyn ferroui_base::ferro_property::AnyValue>> |
Control | Styled | OneWay |
TemplatedParent |
core::option::Option<ferroui_base::type_system::Ref<ferroui_base::ferro_object::FerroObject>> |
StyledElement | Read-only, Direct | OneWay |
TextAlignment |
ferroui_base::media::text_alignment::TextAlignment |
TextBlock | Attached, Styled, Inherited value | OneWay |
TextDecorations |
core::option::Option<ferroui_base::media::text_decoration_collection::TextDecorationCollection> |
Inline | Attached, Styled, Inherited value | OneWay |
TextIndent |
f64 |
Paragraph | Styled | OneWay |
TextLineBounds |
ferroui_base::media::text_line_bounds::TextLineBounds |
TextBlock | Attached, Styled, Inherited value | OneWay |
TextTrimming |
alloc::rc::Rc<dyn ferroui_base::media::text_trimming::TextTrimming> |
TextBlock | Attached, Styled, Inherited value | OneWay |
TextWrapping |
ferroui_base::media::text_wrapping::TextWrapping |
RichTextBlock | Styled | OneWay |
Theme |
core::option::Option<ferroui_base::type_system::Ref<ferroui_base::styling::control_theme::ControlTheme>> |
StyledElement | Styled | OneWay |
Tip |
core::option::Option<alloc::rc::Rc<dyn ferroui_base::ferro_property::AnyValue>> |
ToolTip | Attached, Styled | OneWay |
ToolTip |
core::option::Option<ferroui_base::type_system::Ref<ferroui_controls::tool_tip::ToolTip>> |
ToolTip | Attached, Styled | OneWay |
Transitions |
core::option::Option<ferroui_base::animation::transitions_collection::Transitions> |
Animatable | Styled | OneWay |
Translation |
ferroui_base::vector3d::Vector3D |
Visual | Direct | OneWay |
UseLayoutRounding |
bool |
Layoutable | Styled, Inherited value | OneWay |
VerticalAlignment |
ferroui_base::layout::layoutable::VerticalAlignment |
Layoutable | Styled | OneWay |
VerticalOffset |
f64 |
ToolTip | Attached, Styled | OneWay |
VisualParent |
core::option::Option<ferroui_base::type_system::Ref<ferroui_base::visual::Visual>> |
Visual | Read-only, Direct | OneWay |
Width |
f64 |
Layoutable | Styled | OneWay |
ZIndex |
i32 |
Visual | Styled | OneWay |
Additional XAML properties
Section titled “Additional XAML properties”Blocks— read-only collection or valueTextHighlighters— read-only collection or valueHorizontalTextAlignmentTextLineBounds
Events
Section titled “Events”ContextCanceledContextRequestedDoubleTappedGettingFocusGotFocusHoldingKeyDownKeyUpLosingFocusLostFocusPinchPinchEndedPointerCaptureChangingPointerCaptureLostPointerEnteredPointerExitedPointerMovedPointerPressedPointerReleasedPointerTouchPadGestureMagnifyPointerTouchPadGestureRotatePointerTouchPadGestureSwipePointerWheelChangedPullGesturePullGestureEndedRightTappedScrollGestureScrollGestureEndedScrollGestureInertiaStartingSwipeGestureSwipeGestureEndedTappedTextInputTextInputMethodClientRequested
Keyboard and accessibility
Section titled “Keyboard and accessibility”Verify reading behavior with the actual platform accessibility bridge.
Common mistakes
Section titled “Common mistakes”Test mixed scripts, long documents, and formatting boundaries.
Related guidance
Section titled “Related guidance”This reference describes the framework API. For platform-dependent controls, exercise the matching native sample before relying on browser behavior.