-1

I have some c# winforms project. I add there a user control with some standard components to a split container. This user control looks good in UI editor: How margins looks in editor

The elements are aligned here in absolute layout. No docking used, and Anchor value is default (top, left).

But during runtime components grow in size:

At runtime it looks worse

I have checked OnLoad handler and constructor, there is no code which may expand the components.

What makes controls have different size and margins in editor and during runtime? Where should I look?

Community
  • 1
  • 1
Ivan P.
  • 832
  • 2
  • 9
  • 26
  • There are several forms in project and they have similar problems - components look different in editor and during runtime. – Ivan P. Dec 03 '18 at 06:31
  • Play around the properties window, probably the size and anchor properties – Hari Dec 03 '18 at 07:32
  • 1
    Lack of DPI Awareness syndrome. [How to configure an app to run correctly on a machine with a high DPI setting?](https://stackoverflow.com/questions/13228185/how-to-configure-an-app-to-run-correctly-on-a-machine-with-a-high-dpi-setting-e?answertab=active#tab-top) – Jimi Dec 03 '18 at 07:39

1 Answers1

0

I have achieved desired result by setting AutoScaleMode property for user control and form to None

Ivan P.
  • 832
  • 2
  • 9
  • 26