Quantcast
Channel: wpftoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 2157

New Post: Need current visible area bounds for Zoombox

$
0
0
How can I determine the complete bounds for the current Zoombox view in content coordinates?

I've tried examining properties of CurrentView in CurrentViewChanged handler and Zoombox's ContentPresenter Render Transform, but so far have not found a reliable way of getting the entire bounds of the viewable area in my coordinates. I end up possibly only getting a subsection of the area. For example, trying to get the X- and Y-sizes in my coordinates using (where st is the ScaleTransform in the ContentPresenter TransformGroup)...

zoombox.ActualWidth / st.ScaleX, zoombox.ActualHeight / st.ScaleY

...results in an area maybe only around the quarter of the actual dimensions. Also, resizing the window does not trigger a CurrentViewChange to adjust for the resized zoombox.

So far I've only been able to consistently get good results using zoombox.Viewbox in a case when zoomed in and using panning via Ctrl+drag--a case when the content extends past the viewable area. But things get messed up when the content does not fill the zoombox.

I'm trying to reliably get the current scale so that an adorner will appear a constant size, regardless of the current zoom level. Also I want to clip adorners to the entire viewable area in client coordinates.

TIA!

Viewing all articles
Browse latest Browse all 2157

Trending Articles



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