Reputation: 2014
I have a problem with my visual studio GUI designer. The designer shows different values from my .designer.cs file. For example, item simpleButtonPrint, in the designer I have the following properties:
//
// simpleButtonPrint
//
this.simpleButtonPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.simpleButtonPrint.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
this.simpleButtonPrint.Appearance.Options.UseBackColor = true;
this.simpleButtonPrint.ButtonStyle = DevExpress.XtraEditors.Controls.BorderStyles.Flat;
this.simpleButtonPrint.Image = ((System.Drawing.Image)(resources.GetObject("simpleButtonPrint.Image")));
this.simpleButtonPrint.ImageLocation = DevExpress.XtraEditors.ImageLocation.MiddleCenter;
this.simpleButtonPrint.Location = new System.Drawing.Point(1146, 640);
this.simpleButtonPrint.Margin = new System.Windows.Forms.Padding(15);
this.simpleButtonPrint.Name = "simpleButtonPrint";
this.simpleButtonPrint.Size = new System.Drawing.Size(98, 98);
this.simpleButtonPrint.TabIndex = 9;
this.simpleButtonPrint.Text = "simpleButton4";
this.simpleButtonPrint.Click += SimpleButtonPrint_Click;
In my designer.cs file, the size is 98, 98. In my properties window from visual studio the size is 131, 121. See the screenshot below:
Same button, on another machine:
The problem is when I make any change in the GUI designer, it modifies my designer.cs file as how it is in the GUI designer. It should be a problem with my visual studio, as when my coworker gets the same version from TFS, he does not have the same problem. Any suggestions on how to fix this issue?
Upvotes: 0
Views: 415
Reputation: 2014
Solution:
I changed the scaling mode from Font to DPI, now everything works fine.
Upvotes: -1