Click or drag to resize

TextBlockHelper Class

Attached property provider which adds the read-only attached property IsTextTrimmedProperty to the framework's TextBlock control. Can be used to e.g. show a dynamic tool tip with the full text, that shows up only if the text is really trimmed.
Inheritance Hierarchy
SystemObject
  TomsToolbox.WpfTextBlockHelper

Namespace: TomsToolbox.Wpf
Assembly: TomsToolbox.Wpf (in TomsToolbox.Wpf.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntax
public static class TextBlockHelper

The TextBlockHelper type exposes the following members.

Methods
 NameDescription
Public methodStatic memberGetIsAutomaticToolTipEnabled Gets a value indicating if the automatic tool tip is enabled on this text block or not.
Public methodStatic memberGetIsTextTrimmed Gets the value of the IsTextTrimmed attached property.
Public methodStatic memberSetIsAutomaticToolTipEnabled Sets a value indicating if the automatic tool tip is enabled on this text block or not.
Top
Fields
 NameDescription
Public fieldStatic memberIsAutomaticToolTipEnabledProperty Identifies the IsAutomaticToolTipEnabled attached property.
Public fieldStatic memberIsTextTrimmedProperty Identifies the IsTextTrimmed attached property
Top
Attached Properties
 NameDescription
Public propertyIsAutomaticToolTipEnabled Set this property to true to enable automatic evaluation of the IsTextTrimmed attached property. This property is used by the style identified with the AutoToolTipTextBoxStyle to display of a tool tip only if the text of the text block is trimmed.
Public propertyIsTextTrimmed If the IsAutomaticToolTipEnabled attached property is set to true on a text block, this property reflects if the text inside the text block is trimmed, i.e. not fully visible.
Top
Remarks
Remember to use NotifyOnTargetUpdated=True for bindings, if you need the TextBlockHelper to react to changes to the TextBlock.Text property!
See Also