System.Windows.Forms.TableLayoutPanel Behavior Change .NET 4.5 Framework - by joncloud.sprbrk

Status : 


Sign in
to vote
ID 767282 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 10/12/2012 5:52:12 PM
Access Restriction Public


The behavior when adding controls to a System.Windows.Forms.TableLayoutPanel differs with .NET Framework 4.5.  The attached code when compiled for 2.0, and 4.5 (or 4.0 when 4.5 is installed) displays that the order the controls are displayed is inconsistent.  Also the attached screenshots show visual the difference.
Sign in to post a comment.
Posted by Tanya [MSFT] on 12/3/2012 at 9:45 AM
We’re working on a broad update on a priority basis. We’re unable to communicate public date yet. If you need something immediately, you can contact us for hotfix. Just follow the regular process of opening a support case. Easier option would be to file online or call support;en-us;offerprophone. You will need to pay upfront but you may get refund based on customer support policies.
Thank you,
.NET Framework Product Team

Posted by joncloud.sprbrk on 11/28/2012 at 6:58 AM
Is there any more of a concrete time frame for the release of this correction? We are trying to determine whether or not we can wait for the release of the correction or if we need to correct the issue prior to.
Posted by Tanya [MSFT] on 11/15/2012 at 1:22 PM
We are planning to ship this fix in the upcoming update to .NET Framework 4.5 in the next couple of months. If you apply the suggested workaround, this workaround will be still valid after we ship the fix.

Thank you,
The Windows Forms Product Team
Posted by Microsoft on 10/15/2012 at 6:25 PM
Thank you for your feedback. We are able to reproduce this issue and are considered fixing the issue in our next release.

To work around the issue you can try setting different explicit cell coordinates for each control. Something like that will behave determinstically and will not be a subject of undefined behavior:

            // Red Panel should be on the right.
            panel.Controls.Add(new Panel { BackColor = Color.Red, Dock = DockStyle.Fill }, 1, 0);

            // Green Panel should be on the left.
            panel.Controls.Add(new Panel { BackColor = Color.Green, Dock = DockStyle.Fill }, 0, 0);

Many customers have found it useful to discuss issues like this in the forums ( where Microsoft and other members of the community can suggest workarounds. Please keep the feedback coming.

The Windows Forms Team
Posted by Microsoft on 10/15/2012 at 12:34 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been reproduced and has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by Microsoft on 10/12/2012 at 6:51 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(