Is there an appropriate event for me to hook into to track any time the viewport changes its position or size? I basically want to know where on screen a given viewport is at any time - even if the user moves the window, resizes the app or a viewport, etc.
I’ve checked the usual suspects RhinoView and RhinoViewport for relevant events, but they don’t seem to exist.
The only lead so far is the Handle property on the RhinoView class, you may be able to use some Windows native dll calls there, but that may be tricky…
@dale I know it’s a bit of a hack - I’m rendering a WPF window (from inside a grasshopper plugin) and I’d like the ability to have that window follow the viewport location. I can get at the viewport’s size and position - but I don’t have a proper event to listen for to trigger changes to the window. Any thoughts? Better ways to approach the problem?
I need this event because I have interactive drawings that I need to expire when the viewport size is changed, for example going from 4 views to 1. I can get around this by recalculating and comparing some cache, but this event would be convenient.