In This Article

AdvancedTextBlock Class

Represents an advanced text block control that renders a single line of text but has additional highlighting and overflow options.

[TemplatePart(Name = "PART_TextBlock", Type = typeof(TextBlock))]
public class AdvancedTextBlock : Control, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient
Inheritance:
System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control Object

Constructors

AdvancedTextBlock()

Initializes an instance of the AdvancedTextBlock class.

public AdvancedTextBlock()

Properties

Captures

Gets or sets the collection of text captures to highlight.

public IEnumerable<StringFilterCapture> Captures { get; set; }

Property Value

System.Collections.Generic.IEnumerable<StringFilterCapture>:

The collection of text captures to highlight.

HasToolTipOnOverflow

Gets or sets whether the control's tool tip is automatically set to the Text value when overflowed.

public bool HasToolTipOnOverflow { get; set; }

Property Value

System.Boolean:

true if the control's tool tip is automatically set to the Text value when overflowed; otherwise, false. The default value is true.

HighlightBackground

Gets or sets the background System.Windows.Media.Brush to use for highlighted capture ranges.

public Brush HighlightBackground { get; set; }

Property Value

System.Windows.Media.Brush:

The background System.Windows.Media.Brush to use for highlighted capture ranges.

HighlightFontWeight

Gets or sets the System.Windows.FontWeight to use for highlighted capture ranges.

public FontWeight HighlightFontWeight { get; set; }

Property Value

System.Windows.FontWeight:

The System.Windows.FontWeight to use for highlighted capture ranges. The default value is Bold.

HighlightForeground

Gets or sets the foreground System.Windows.Media.Brush to use for highlighted capture ranges.

public Brush HighlightForeground { get; set; }

Property Value

System.Windows.Media.Brush:

The foreground System.Windows.Media.Brush to use for highlighted capture ranges.

IsOverflowed

Gets whether the text is overflowed.

public bool IsOverflowed { get; }

Property Value

System.Boolean:

true if the text is overflowed; otherwise, false.

Text

Gets or sets the text string to render.

public string Text { get; set; }

Property Value

System.String:

The text string to render.

TextTrimming

Gets or sets the TextTrimming mode to use.

public TextTrimming TextTrimming { get; set; }

Property Value

System.Windows.TextTrimming:

The TextTrimming mode to use. The default value is CharacterEllipsis.

Methods

ArrangeOverride(Size)

When overridden in a derived class, positions child elements and determines a size for a System.Windows.FrameworkElement derived class.

protected override Size ArrangeOverride(Size finalSize)
Parameter Type Description
finalSize System.Windows.Size

The final area within the parent that this element should use to arrange itself and its children.

Returns

System.Windows.Size:

The actual size used.

OnApplyTemplate()

Invoked whenever application code or internal processes call ApplyTemplate.

public override void OnApplyTemplate()

OnCreateAutomationPeer()

Returns an System.Windows.Automation.Peers.AutomationPeer object for this control instance.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

System.Windows.Automation.Peers.AutomationPeer:

An System.Windows.Automation.Peers.AutomationPeer instance.

Fields

CapturesProperty

Identifies the Captures dependency property. This field is read-only.

public static readonly DependencyProperty CapturesProperty

HasToolTipOnOverflowProperty

Identifies the HasToolTipOnOverflow dependency property. This field is read-only.

public static readonly DependencyProperty HasToolTipOnOverflowProperty

HighlightBackgroundProperty

Identifies the HighlightBackground dependency property. This field is read-only.

public static readonly DependencyProperty HighlightBackgroundProperty

HighlightFontWeightProperty

Identifies the HighlightFontWeight dependency property. This field is read-only.

public static readonly DependencyProperty HighlightFontWeightProperty

HighlightForegroundProperty

Identifies the HighlightForeground dependency property. This field is read-only.

public static readonly DependencyProperty HighlightForegroundProperty

IsOverflowedProperty

Identifies the IsOverflowed dependency property. This field is read-only.

public static readonly DependencyProperty IsOverflowedProperty

TextProperty

Identifies the Text dependency property. This field is read-only.

public static readonly DependencyProperty TextProperty

TextTrimmingProperty

Identifies the TextTrimming dependency property. This field is read-only.

public static readonly DependencyProperty TextTrimmingProperty

Inherited Members

  • System.Object.ToString()
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object, System.Object)
  • System.Object.ReferenceEquals(System.Object, System.Object)
  • System.Object.GetHashCode()
  • System.Object.GetType()
  • System.Object.MemberwiseClone()

Extension Methods