question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[MDI] Add possibility to align minimized child to default location (TOP LEFT)

See original GitHub issue

Is 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): Snipaste_2021-03-24_09-44-51 after res. change (left - WinForms, right - MFC): Snipaste_2021-03-24_09-45-13

Video:

https://user-images.githubusercontent.com/17767561/112429754-26a14200-8d4e-11eb-83d5-393626ad23b6.mp4

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.

  1. Discuss a name for the property.
  2. Discuss a description for the property. Translations?
  3. Category: Style or may be Layout?
  4. Implement trivial logic with this property in SetBoundsCore method of MdiClient class and do PR.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:30 (26 by maintainers)

github_iconTop GitHub Comments

2reactions
terrajobstcommented, Jul 9, 2021

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.

2reactions
merriemcgawcommented, Jun 11, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found