This topic will help you understand the document splitting capability of the xamSyntaxEditor™ and how to customize it.
The following topics are prerequisites to understanding this topic:
This topic contains the following sections:
The xamSyntaxEditor supports splitting of the editing area (either horizontally or vertically). When enabled, the user may use this feature for a visual comparison of two parts of the edited document and make changes to both of them. You can configure which splitting is available to the user (see the table below). In addition, there is a property, which can be used to determine the current splitting status of the xamSyntaxEditor’s editing area.
The screenshot below shows the xamSyntaxEditor’s split handles:
The screenshot below shows the xamSyntaxEditor split horizontally:
The following table lists the configurable aspects of the xamSyntaxEditor’s splitting capabilities.
You can enable/disable what splitting is available to the user.
The following table maps the desired configuration to property settings.
The screenshot below demonstrates how the xamSyntaxEditor looks as a result of implementing the following settings:
You can obtain and set the current splitting status and see if and how the user has split the editing area.
The following table maps the desired configuration to property settings.
The following code example shows how to obtain the current split status:
In C#:
if (this.xamSyntaxEditor1.SplitStatus ==
EditorDocumentViewSplitStatus.SplitHorizontally)
{
// do something
}
else if (this.xamSyntaxEditor1.SplitStatus ==
EditorDocumentViewSplitStatus.SplitVertically)
{
// do something else
}
In Visual Basic:
If Me.xamSyntaxEditor1.SplitStatus = _
EditorDocumentViewSplitStatus.SplitHorizontally Then
' do something
ElseIf Me.xamSyntaxEditor1.SplitStatus = _
EditorDocumentViewSplitStatus.SplitVertically Then
' do something else
End If
The following code example shows how to set the current split to vertical:
In C#:
this.xamSyntaxEditor1.SplitStatus = EditorDocumentViewSplitStatus.SplitVertically;
In Visual Basic:
Me.xamSyntaxEditor1.SplitStatus = EditorDocumentViewSplitStatus.SplitVertically
The following topics provide additional information related to this topic.