LayoutTransform on Windows ?!


  • Hello, I encountered a strange problem while trying to apply a ScaleTransform to a Window:


    ScaleTransform stNewLayout = new ScaleTransform(Param1, Param2);

    this.LayoutTransform = stNewLayout;


    This does not work.

    If I apply the same ScaleTransform to a StackPanel or a grid, the layout is updated.

    What's the problem?

    Is there a way to use ScaleTransform on a Window?

    I don't want to use "SizeToContent" and ScaleTransform on my window's child.

    Thanks for help,


    Tuesday, July 03, 2007 11:30 AM


  • In case someone is interested:

    Windows are not created by WPF but by Win32.

    That's why the ScaleTransform does not work.

    Instead, it's possible to Scale the window's (single) child  and to use the "SizeToContent" property of the window.

    It's quite not beautiful but it seems to me that this is the only way to do ...

    If someone finds something, let me know Smile


    Tuesday, July 03, 2007 12:52 PM