I am using the UIA TransformPattern.Resize pattern to resize a window. It works, but closes the window as soon as the resize shows. Is this intentional?
Here's the code that does the resize:
internal static int Resize(AutomationElement control, double width, double height) { TransformPattern pat = (TransformPattern) CommonUIAPatternHelpers.CheckPatternSupport(TransformPattern.Pattern, control); if (pat.Current.CanResize) { pat.Resize(width, height); return 0; } return -1; }As I said, the resize works, but it then closes the window (on both a WinForm and a WPF Form).