TextBlock
Description
Fluence TextBlock presents text using the Fluent typography ramp.
Use it for read-only text that should follow the Fluent typography ramp.
Example usage
- XAML
- C#
<fluence:TextBlock Text="Section heading" Typography="Subtitle" />
var label = new Fluence.Wpf.Controls.TextBlock { Text = "Hello" };
Key properties
| Property | Default | Purpose |
|---|---|---|
Text | Empty string | Text to display. |
Typography | Body | Selects a Fluent typography role. |
TextWrapping | NoWrap | Controls line wrapping. |
TextTrimming | None | Controls trimming when text overflows. |
State and behavior
Typography selects the named font-size role. An explicit FontSize set locally, through a binding, or by an application style takes precedence; removing that override restores the named size. Theme changes update the foreground and continue to supply the font family.
Parts
TextBlockExtensions
Description
TextBlockExtensions adds Fluent typography and related attached properties to native text. The screenshots show TextBlockExtensions inside TextBlock.
The gallery image shows the typography ramp on a native TextBlock. It does not isolate an attached TextBlockExtensions property.
See the parent control captures above for this part in context.
Example usage
<TextBlock Text="Section heading"
fluence:TextBlockExtensions.Typography="Subtitle" />
State and behavior
Attached typography and selection properties change native text presentation.
Reference
Additional behavior
Typography styles such as BodyTextBlockStyle and TitleLargeTextBlockStyle are application resources. See theming.