Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

How to get correct ViewportTop of the text editor

$
0
0

I want to make a margin inside the text editor by using IWpfTextViewMargin.
However, when I access the IWpfTextView.ViewportTop, it sometimes has negative value. How can I get the correct ViewportTop?

By scrolling the vertical scrollbar inside the text editor, the wpf viewport which representing the text will be scrolled. The initial condition of the ViewportTop is 0.0 but sometimes, it will be negative. How can I get the pixels of actual scrolling distance of the viewport when vertical scrollbar is scrolled?

 

msdn 论坛回复


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>