MyControl : ContentControl
| ContentProperty ________|__________ | | | Grid Canvas WrapPanel etc.. |_______|_________| | Drag Moving Childs
So,it makes easier to change the type of Panel,mantaining Logics as Zoom,Pan,Drag Children,implemented in Parent ContentControl.
Arrange/Measure Override problems,Mouse positioning on drag has become an hell. Seems all positions are offsetted:
e.GetPosition(this.Content as Panel).X
makes Dragged Children moving with a huge offset on the left.
and
Translate(Point,UIElement)
seems having no effect in any combination of call:
this.Content.Translate(Point,Children);
or
Child.Content.Translate(Point,this.Content);
neither trying:
Offset(x,y)
before and after a TranslateTransform or an HitTest.
Great Example of Similar Scenario: http://www.codeproject.com/KB/WPF/zoomandpancontrol.aspx
How can I FIX Drag Offsets in HitTesting/DragMove? What exactely can I FIX in Arrange/Measure Override to have a working TranslateTransform without an UnTranslable offset? Thanks