Control that supports getting handle and rotatetransform RRS feed

  • Question

  • Hi guys, got a problem.

    I'm working with some cameras and pulling in the video stream. The cameras I'm accessing provides an sdk to work with it however in order to get the stream you have to assign it to a control that has a handle. As far as I know the window and the windowsformshost controls are they only two that provide a handle to snap the video stream to. This works perfect in both aspects.

    The big issue is that I have to apply transformations on it, not to rotate the video stream, but to use multi-gesture to swipe both fingers and zoom into the video stream and then swiping back and forth to move around the zoomed in video stream (and zoom out of course). The window doesn't allow for this, and neither does the windowsformshost.

    I've been trying different ways to produce the correct results but no luck after several hours. Does anybody have any ideas on how to accomplish this? Or to point me in the right direction.


    FYI... I attempted using the surface sdk to see if there was a way but still not luck. Maybe i missed something.

    Monday, August 1, 2011 9:27 PM


  • Hi bl4kh4k,

    WPF with WindoesFormsHost or Win32 integration has the limitation on the transform, please read the following document about it: http://msdn.microsoft.com/en-us/library/ms744952.aspx

    • Windows Forms controls cannot be rotated or skewed. The WindowsFormsHost element raises the LayoutError event if you apply a skew or rotation transformation. If you do not handle the LayoutError event, an InvalidOperationException is raised.
    • In most cases, Windows Forms controls do not support proportional scaling. ...


    So we cannot apply one WPF way to do the transform on the integrated Winform Control. We have to find one Winform or native solution to tranform the content.



    Bob Bao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Jie Bao Monday, August 8, 2011 4:31 PM
    Wednesday, August 3, 2011 7:26 AM