Persisting the viewport


Author
Message
Andrew Shand
Andrew Shand
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)
Group: Forum Members
Posts: 7, Visits: 4
I'd like to persist my NDrawingView origin and zoom values, i.e. the Viewport, so that I can later recreate the window with the same view on my document. Unfortunately, it seems that the NDrawingview.Viewport property doesn't have a setter.

How can I persist and reload the window view extent (I don't want to serialize the whole NDrawingView) ?

Thanks
Andy
Reply
Andrew Shand
Andrew Shand
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)
Group: Forum Members
Posts: 7, Visits: 4
Thanks,

I've tried saving the NDrawingView.ViewportOrigin and NDrawingView.ScaleX & ScaleY properties, and then reassigning them back to the view when it is recreated.

On recreation, I set the ScaleX & ScaleY properties successfully, but the ViewportOrigin setter doesn't seem to "take" the PointF value I assign to it - it's getter value doesn't match the value I've set. Is there some additional validation logic within the ViewportOrigin setter that requires other stuff to be set correctly first?

Can you advise on the minimum properties I need to persist and restore to get back the zoom and pan state for the control? Are there other refresh methods I need to call?

Thanks
Andy
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search