Posted 1 month ago by chaya w
Version: 24.1.4
Avatar

Hi,

I'm using WPF SyntaxEditor in TabControl in order to edit some files together.

I want to save the Scroll positions when moving between tabs.

So i try to save in my model the ActiveView.ScrollState.HorizontalAmount and ActiveView.ScrollState.VerticalAnchorTextPosition.Line, and then in DocumentChanged event i call to ctiveView.Scroller.ScrollTo(new TextViewScrollState(new TextPosition(DocumentScriptModel.VerticalLinePosition, 0), DocumentScriptModel.HorizontalPosition));

the problem is that when the file is long, and cannot display all text without scrolling - the restore works as well, but when there is short content, it come back to position 0.

So i need solution - or in which event i can call the scrollTo again after loaded completly, and maybe it will work. or how rto disable the scroller when not need it.

Thank you!

Comments (1)

Posted 1 month ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Please create a new simple sample project that shows the two scenarios you describe above and indicate in there where you see problems occurring.  Then we can debug with that sample and see what is happening behind the scenes for your exact scenario, and can make any necessary code updates.  Email our support address with the sample and mention this thread.  Be sure to exclude the bin/obj folders from the .zip you send so it doesn't get spam blocked.  Thanks!


Actipro Software Support

The latest build of this product (v24.1.5) was released 4 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.