Layout Transform v/s Render Transform
-
I'm working on WPF project in which I need to implement ZoomIn / ZoomOut on Scrollviewer object with seperate pan zoom window. There are two types of transformation which can be applied i.e. Layout Transform & Render Transform. Now the problem is I want to use the best of both kind of transformation. I have a pan zoom window which shows the view of my scroll viewer object.When the view of my scrollviewer object changes i notify to pan zoom window to reflect the view of scroll viewer object. For transformation, scrollviewer object's three properties are important. ViewPortSize, ExtentSize and Offset. When ZoomIn is performed, ViewPortSize and ExtentSize remains same in both Layout and Render transformation while Offset value gets changed in layout transform but in Render transform scrollviewer object's offset value is not changing. Because of this in render transform, even if the view(or layout) of my scrollviewer object in main canvas has changed still I can not send the changed information to pan zoom window (as offset value is same). So my problem is my ZoomIn / ZoomOut related requirements are perfectly satisfied using Render Transform but if I use Render transform I can not update my view in Pan Zoom Window. Can any one suggest me the work around for this problem. (I want to implement the zooming in the same way as implemented in Microsoft Visio. Pressing ctrl key n mouse wheel move wil provide the zooming operation in visio) Below I'm pasting one link in which the problem described is I think somewhat related to my problem. https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=991579&SiteID=1[^] Hope I have been able to put up my question in proper way. Pls revert back in case more clarification needed. Thanks in advance.....:)