Synchronize to SyntaxEditors

SyntaxEditor for WPF Forum

Posted 3 years ago by Frank Link - CEO, FLK Consulting UG
Version: 16.1.0634
Avatar

Hello,

ow can i synchronize the vertical scrollbars from two syntaxeditor instances to develop a diff tool.

Can you help me to do this.

Regard

Frank

Comments (3)

Posted 3 years ago by Erwin Liong
Avatar

Would Actipro provide a diff-merge tool? Personally, I see value in having one. 

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Frank,

If you had two SyntaxEditor instances side-by-side, you'd first want to disable the "split" view capabilities of each.  Then in the main view of each editor, you'd want to attach to their "SyntaxEditor.ActiveView.TextAreaLayout" events.  That fires whenever a layout occurs, such as scrolling, text changes, etc.  In response to that event, you'd make sure the views' FirstVisiblePosition property remains in sync.  That should keep them scrolling together.  Hope that helps!

Erwin, in regards to a diff implementation, thanks for the suggestion.  We will write it down for possible future consideration.  Have you seen any good C#-oriented examples of diff logic out there?


Actipro Software Support

Posted 3 years ago by Erwin Liong
Avatar

I am not too sure myself. Perhaps, this might be a good starting ground : http://menees.com

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.