SyntaxEditor in Tabbed Documents

SyntaxEditor for WPF Forum

Posted 6 years ago by Gergely Bacsó
Version: 17.2.0672
Avatar

Hi,

I'm using the syntax editor control in tabbed documents. I keep the views (the syntaxeditor controls) in memory, however not in the visual tree, when switching between tabs. (I have a ContentControl in the DataTemplate of the Tabbed Document, and I set the ContentControl's Content to the actual view.)

My problem is when I switch between tabs, line modification marks disappear in the syntax editors.
Is there a way to prevent this behavior?

Thank you,
Gergely

Comments (2)

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

Hello,

The data used to track line modification marks should be stored in the document's UndoHistory.  I would expect that to be maintained unless your document's undo history is getting cleared somehow.  Is that possibly happening?  If you'd like us to look into it, please send our support address a new simple sample project showing the issue and mention this thread in your email.  Remove any bin/obj folders from the ZIP you send and rename the .zip file extension so it doesn't get spam blocked.  Thanks!


Actipro Software Support

Posted 6 years ago by Gergely Bacsó
Avatar

Hi,

based on what you said, I looked into my code if maybe I did something wrong.

There was a Loaded event handler which supposed to set the text of the syntax editor during initialization. But this event was fired every time the control was added to the visual tree, so this caused that the history had got lost.

Thank you for helping me clarify this, and keep up the good work!

Best Regards.

The latest build of this product (v24.1.1) 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.