This topic explains the whitespace highlighting feature.
The following topics are prerequisites to understanding this topic:
This topic contains the following sections:
The whitespace highlighting feature indicates all of the places within the TextDocument
occupied by spaces or tabs by displaying them within the editing area using symbols, colored dots and arrows respectively, thus highlighting their locations; these symbols do not replace the spaces or tabs contained within the document.
The following screenshot shows the xamSyntaxEditor with the whitespace highlighting feature enabled and the drawing brush set as magenta.
The following table lists the configurable aspects of the whitespace highlighting feature of the xamSyntaxEditor control. Additional information is available following the table.
Use the xamSyntaxEditor control’s WhitespaceIndicatorVisibility
property to enable/disable whitespace highlighting.
The following code snippet demonstrates how to enable whitespace highlighting:
In C#:
this.xamSyntaxEditor1.WhitespaceIndicatorVisibility = Visibility.Visible;
In Visual Basic:
Me.xamSyntaxEditor1.WhitespaceIndicatorVisibility = Visibility.Visible
Use the xamSyntaxEditor control’s WhitespaceIndicatorBrush
property to set the whitespace highlighting brush.
The following code example demonstrates how to set a solid magenta color brush for whitespace highlighting:
In C#:
this.xamSyntaxEditor1.WhitespaceIndicatorBrush = new SolidColorBrush(Colors.Magenta);
In Visual Basic:
Me.xamSyntaxEditor1.WhitespaceIndicatorBrush = New SolidColorBrush(Colors.Magenta)
The following topics provide additional information related to this topic.