c# - How to obtain visible borders of canvas placed on scrollviewer -


i have canvas placed on scrollviewer in order allow scrolling. possible coordinates of visible part of canvas?

i trying calculate way

leftborder = scrollviewer1.horizontaloffset; rightborder = scrollviewer1.viewportwidth - scrollviewer1.horizontaloffset;  topborder = scrollviewer1.verticaloffset; bottomborder = scrollviewer1.viewportheight - scrollviewer1.verticaloffset; 

but seems not working.

the horizontal , vertical offset actual scroll value in direction. besides that, if want size of content without scrollbars might visible. can search child named "part_scrollcontentpresenter". shows actual content of scrollviewer, , content resized when scrollbars needs more space.

hope helps.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -