Gets or sets the partner instance.
Namespace: CleanCode.SqlEditorControlsAssembly: CleanCode.SqlEditorControls (in CleanCode.SqlEditorControls.dll) Version: 1.2.3.0 (1.2.03)
public SqlEditor Partner { get; set; }
Public Property Partner As SqlEditor
Get
Set
public:
property SqlEditor^ Partner {
SqlEditor^ get ();
void set (SqlEditor^ value);
}
Field Value
The partner.
SqlEditor provides a framework for synchronizing one instance with another.
For example, if you scroll one instance, the other scrolls the same amount.
Or if you load a file from one directory in one instance, you could
automatically load a file of the same name from another directory.
For a full list of the actions that synchronize see
TandemMode.
Enabling this synchronization requires just two simple steps.
First, assign each other as a partner:
SqlEditor leftPane = new SqlEditor();
SqlEditor rightPane = new SqlEditor();
leftPane.Partner = rightPane;
rightPane.Partner = leftPane;
SqlEditor leftPane = new SqlEditor();
SqlEditor rightPane = new SqlEditor();
leftPane.Partner = rightPane;
rightPane.Partner = leftPane;
leftPane.TandemMode = true;
rightPane.TandemMode = true;
leftPane.TandemMode = true;
rightPane.TandemMode = true;
Second, enable TandemMode in both:
Assigning a partner also changes the StructuredTraceSource that this instance will use from
the eponymous "SqlEditor" to the specific
Name of this instance.
This allows you to distinguish activity from individual instances
in your trace output. Similarly, if the partner is removed (set to null)
the StructuredTraceSource is reset to "SqlEditor".