HighlightingTextBlock
Ecng.Xaml
A specialized highlighting text block control. http://www.jeff.wilcox.name/2008/11/highlighting-autocompletebox/
Inherits: TextBlock
Implements: IComponentConnector
Constructors
HighlightingTextBlock
public HighlightingTextBlock()
highlightingTextBlock = HighlightingTextBlock()
Initializes a new HighlightingTextBlock class.
Properties
HighlightBrush
public Brush HighlightBrush { get; set; }
value = highlightingTextBlock.HighlightBrush
highlightingTextBlock.HighlightBrush = value
Gets or sets the highlight brush.
HighlightFontWeight
public FontWeight HighlightFontWeight { get; set; }
value = highlightingTextBlock.HighlightFontWeight
highlightingTextBlock.HighlightFontWeight = value
Gets or sets the font weight used on highlighted text.
HighlightText
public string HighlightText { get; set; }
value = highlightingTextBlock.HighlightText
highlightingTextBlock.HighlightText = value
Gets or sets the highlighted text.
Methods
ApplyHighlighting
private void ApplyHighlighting()
highlightingTextBlock.ApplyHighlighting()
Apply the visual highlighting.
InitializeComponent
public void InitializeComponent()
highlightingTextBlock.InitializeComponent()
InitializeComponent
OnHighlightBrushPropertyChanged
private static void OnHighlightBrushPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
HighlightingTextBlock.OnHighlightBrushPropertyChanged(d, e)
HighlightBrushProperty property changed handler.
- d
- HighlightingTextBlock that changed its HighlightBrush.
- e
- Event arguments.
OnHighlightFontWeightPropertyChanged
private static void OnHighlightFontWeightPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
HighlightingTextBlock.OnHighlightFontWeightPropertyChanged(d, e)
HighlightFontWeightProperty property changed handler.
- d
- HighlightingTextBlock that changed its HighlightFontWeight.
- e
- Event arguments.
OnHighlightTextPropertyChanged
private static void OnHighlightTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
HighlightingTextBlock.OnHighlightTextPropertyChanged(d, e)
HighlightText property changed handler.
- d
- AutoCompleteBox that changed its HighlightText.
- e
- Event arguments.
Fields
HighlightBrushProperty
public static readonly DependencyProperty HighlightBrushProperty
value = HighlightingTextBlock.HighlightBrushProperty
Identifies the HighlightBrush dependency property.
HighlightFontWeightProperty
public static readonly DependencyProperty HighlightFontWeightProperty
value = HighlightingTextBlock.HighlightFontWeightProperty
Identifies the HighlightFontWeight dependency property.
HighlightTextProperty
public static readonly DependencyProperty HighlightTextProperty
value = HighlightingTextBlock.HighlightTextProperty
Identifies the HighlightText dependency property.