SqlEditor Partner Property CleanCode C# Libraries v1.2.03 API
Gets or sets the partner instance.

Namespace: CleanCode.SqlEditorControls
Assembly: CleanCode.SqlEditorControls (in CleanCode.SqlEditorControls.dll) Version: (1.2.03)

public SqlEditor Partner { get; set; }

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;
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".
See Also