[MDI] Add possibility to align minimized child to default location (TOP LEFT)
See original GitHub issueIs your feature request related to a problem? Please describe.
WinForms override standard MDI behavior without option to use original one. It’s lead to all child windows layout (with minimized windows) are mess up after main window resize. This can happened after simple resize, or after resolution changed (for example if your connect by rdp from other device), etc…
before res. change (left - WinForms, right - MFC):
after res. change (left - WinForms, right - MFC):
Video:
For now we need to manually revert this move (with same technique) after each resize 😦
Draft API Proposal
- Will this feature affect UI controls? Yes.
- Will VS Designer need to support the feature? If yes, describe how you expect it to funсtion. Yes - Form will have a new property in PropertyGrid
- What impact will it have on accessibility? No.
- Will this feature need to be localized or be localizable? Yes.
We need to add bool property to Form
class, let it be MdiChildrenMinimizedAnchorTop
:
namespace System.Windows.Forms
{
public partial class Form : ContainerControl
{
/// <summary>
/// true - anchoring minimized MDI children to the TopLeft of the parent form (windows default). false - anchoring minimized MDI children to the BottomLeft of the parent form (WinForms default)
/// </summary>
[SRCategory(nameof(SR.CatWindowStyle))]
[DefaultValue(false)]
[SRDescription(nameof(SR.FormMdiChildrenMinimizedAnchorTopDescr))]
public bool MdiChildrenMinimizedAnchorTop { get; set; }
}
}
To do.
- Discuss a name for the property.
- Discuss a description for the property. Translations?
- Category: Style or may be Layout?
- Implement trivial logic with this property in
SetBoundsCore
method ofMdiClient
class and do PR.
Issue Analytics
- State:
- Created 2 years ago
- Comments:30 (26 by maintainers)
Top Results From Across the Web
how to change position of minimized child forms in MDI ...
I want to change that default location and put it either on bottom-right cornor or bottom-center. is it possible? I tried lot.
Read more >how to change the location of a minimized mdichild form?
Try to read the ClientRectangle from the parent and apply the location to the child accordingly before minimizing.
Read more >Form.MdiChildrenMinimizedAnchorBottom Property
Gets or sets the anchoring for minimized MDI children. ... MDI children to the bottom left of the parent form, whilst the Windows...
Read more >How do I make an MDI Child Form Always on Top of other ...
The new form is now "above" all the MDI Child forms, and travels with the MDI Form when the MDI Form is moved...
Read more >mdi application' window is resized/repositioned by mistake ...
Open any MDI child window and maximize it . You can observe that system icons (Minimize, Maximized and Close) are available in the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Easiest is to file an issue in the winforms repo, put it in the 6.0.0 milestone, mark it as blocking and api-ready-for-review. We’ll look at it first thing Tuesday morning then.
We are looking for someone to propose (and implement) an API that would enable this to happen. It has to go through the full API review process, and we can help a bit with that. But it looks like there are more urgent fires to fight for .NET 6 so it doesn’t look like we will have the resources to enable this feature just yet. If the community can, that would be something we’d totally take.