Class RadHighlightTextBlock
A custom TextBlock control that allows for emphasizing a part of its text.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.dll
Syntax
[TelerikToolboxCategory("Common")]
public class RadHighlightTextBlock : TextBlock, IThemable
Constructors
RadHighlightTextBlock()
Initializes a new instance of the RadHighlightTextBlock class.
Declaration
public RadHighlightTextBlock()
Fields
HighlightBackgroundProperty
Identifies the HighlightBackground dependency property.
Declaration
public static readonly DependencyProperty HighlightBackgroundProperty
Field Value
System.Windows.DependencyProperty
|
HighlightForegroundProperty
Identifies the HighlightForeground dependency property.
Declaration
public static readonly DependencyProperty HighlightForegroundProperty
Field Value
System.Windows.DependencyProperty
|
HighlightModeProperty
Identifies the HighlightMode dependency property.
Declaration
public static readonly DependencyProperty HighlightModeProperty
Field Value
System.Windows.DependencyProperty
|
HighlightTextProperty
Identifies the HighlightText dependency property.
Declaration
public static readonly DependencyProperty HighlightTextProperty
Field Value
System.Windows.DependencyProperty
|
IsCaseSensitiveProperty
Identifies the IsCaseSensitive dependency property.
Declaration
public static readonly DependencyProperty IsCaseSensitiveProperty
Field Value
System.Windows.DependencyProperty
|
Properties
HighlightBackground
Gets or sets the background of the highlighted text.
Declaration
public Brush HighlightBackground { get; set; }
Property Value
System.Windows.Media.Brush
|
HighlightForeground
Gets or sets the foreground of the highlighted text.
Declaration
public Brush HighlightForeground { get; set; }
Property Value
System.Windows.Media.Brush
|
HighlightMode
Gets or sets the highlight mode.
Declaration
public HighlightMode HighlightMode { get; set; }
Property Value
HighlightMode
|
HighlightText
Gets or sets the portion of the Text which should be highlighted.
Declaration
public string HighlightText { get; set; }
Property Value
System.String
|
IsCaseSensitive
Gets or sets a boolean value indicating whether the Text will be searched for matches in a case sensitive manner.
Declaration
public bool IsCaseSensitive { get; set; }
Property Value
System.Boolean
|
Methods
GetHighlightInfos()
Returns the list of HighlightTextInfo objects indicating the parts of the text that need to be highlighted.
Declaration
protected virtual IEnumerable<HighlightTextInfo> GetHighlightInfos()
Returns
System.Collections.Generic.IEnumerable<HighlightTextInfo>
|
HighlightTextRange(HighlightTextInfo)
Applies the styling to the TextRange instance created from the HighlightTextInfo.
Declaration
protected virtual void HighlightTextRange(HighlightTextInfo info)
Parameters
HighlightTextInfo
info
|
OnCreateAutomationPeer()
Creates a RadHighlightTextBlockAutomationPeer.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer
|
OnInitialized(EventArgs)
Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.EventArgs
e
The System.Windows.RoutedEventArgs that contains the event data. |
ResetTheme()
Resets the theme.
Declaration
public void ResetTheme()
SetDefaultStyleKey()
Sets the default style key for StyleManager based on the current theme.
Declaration
protected virtual void SetDefaultStyleKey()