Control location changes in the NetFrameFramework
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 1.1k
- Avg merge
- 1d 13m
- Merged PRs (30d)
- 85
Description
* .NET Core Version:
3.1project
* Have you experienced this same bug with .NET Framework?:
Yes
**Problem description:**
I have created the Netcore 3.1 project and i have added the datagridview and button in the designer level. Then I have added the button in the constructor of the form and set some location. Please find the code snippet below.
```
public Form1()
{
InitializeComponent();
Button button = new Button() { Size = new System.Drawing.Size(200, 50), Text = "Click" };
Panel panel = new Panel();
panel.Controls.Add(button);
this.Controls.Add(panel);
panel.Location = new System.Drawing.Point(1389, 150);
OrderInfoCollection data = new OrderInfoCollection();
dataGrid.DataSource = data.OrdersListDetails;
}
```
While i open the same application in the netframework, the button location changes. Please refer the below screenshots.
NetCore

NetFrameWork

**Expected behavior:**
I dont know why the location changes in the Netframework and this location changes should not occur.
**Minimal repro:**
Run the NetCore project and 2017 project of below attached sample.
[Sample.zip](https://github.com/dotnet/winforms/files/5955508/Sample.zip)
Contributor guide
Assessment
This issue has not been assessed yet.