-
Notifications
You must be signed in to change notification settings - Fork 903
Open
Description
Sequence of actions:
- Child window. Left > 0 and Top > 0.
- Maximize the window to full screen.
- Restore the window position to the previous state.
Left = 0 and Top = 0. That is, the previous position is not restored.
Source code:
private void Child_MaximizedChanged(object sender, EventArgs e) {
...
WindowContainerChildData initialData = (WindowContainerChildData)windowControl.InitialData;
windowControl.Left = initialData.Left;
windowControl.Top = initialData.Top;
windowControl.Width = initialData.Width;
windowControl.Height = initialData.Height;
windowControl.UpdateLayout();
windowControl.Left = this.GetRestrictedLeft(windowControl);
windowControl.Top = this.GetRestrictedTop(windowControl);
}
}
Corrected code:
private void Child_MaximizedChanged(object sender, EventArgs e) {
...
WindowContainerChildData initialData = (WindowContainerChildData)windowControl.InitialData;
windowControl.Width = initialData.Width;
windowControl.Height = initialData.Height;
windowControl.UpdateLayout();
windowControl.Left = initialData.Left;
windowControl.Top = initialData.Top;
windowControl.Left = this.GetRestrictedLeft(windowControl);
windowControl.Top = this.GetRestrictedTop(windowControl);
}
}
Metadata
Metadata
Assignees
Labels
No labels