Synchronize to SyntaxEditors

SyntaxEditor for WPF Forum

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


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

Can you help me to do this.



Comments (3)

Posted 8 years ago by Erwin Liong

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

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

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 8 years ago by Erwin Liong

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

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.