c # Forms control layout properties

layout

AutoScaleMode : When the screen resolution or font changes, forms and controls how the changes.
- None: disable automatic scaling. (Default)
- the Font: The font type used (typically a system font) scaling the dimensions of the control. If you want to control or form according to the operating system font size to stretch or shrink, press Font scaling is useful, if the absolute size of the control or form does not matter in this way should be used to zoom. For example: a button text, change the system font size, button also becomes larger to be able to display the full text. Examples: a new winform, font 'Arial 9pt', there is a button above, for the reference, then, to change the font size winform, it is changed to '16pt Times New Roman' bar. This time, even the buttons are larger.
- Dpi: control the zoom according to the display resolution. Common resolution of 96 and 120 DPI. If you want to determine relative to the screen size control or form, press Dpi scaling is useful. For example, to display charts or other graphical controls, you may want to use dots per inch (DPI) scale, so that the control is always occupy a certain percentage of the screen
- Inherit: Control scaled according to the parent class of the class of zoom mode. If there is no parent, automatic scaling is disabled.
The AutoScroll : Only when the control's content area is larger than its visible scroll bars automatically appear.
- TRUE- is
- FALSE- whether
the AutoSize : Specifies whether the control automatically resize itself to fit the size of its content.
- TRUE- is
- FALSE- whether
the AutoSizeMode : Specifies the user interface element itself automatically adjusts the size of the pattern.
- GrowOnly- generated forms can adjust the size of the mouse
- GrowAndShrik- generated forms not adjust the size of the mouse
Records : a control is bound to define the edge of the container, when the control is anchored to an edge, and the distance between the edge of the control and specify the edge closest to the specified edge will remain unchanged.
-Top-- represents the top of the control associated with the parent window (or parent control) should remain fixed
- Bottom-- represent control associated with the parent window (or parent control) should remain fixed bottom
- Left-- representation controls related to the parent window (or parent control) left edge should remain fixed
- Right-- represent control associated with the parent window (or parent control) should remain fixed right edge
- None-- float
the Dock : for specified control should be parked on the border of the window, the user re-set the size of the window, the control will continue to park on the border of the window, for example, if the specified control rests on the bottom border of the window, regardless of size changes of the window, this controls will change size, or move it, always make sure the bottom of the screen. Although the Anchor property can also do this, but the dock property so that you can make in a child form another parent form can be "stacked" above (or beside).
- Top-- force control in the parent form (or control) of the top. If there are other same parent child control is also set to form docked at the top, then control each stacked above each other.
- Bottom-- force control in the parent form (or control) at the bottom. If there are other same parent child control is also set to form docked at the bottom, then control each stacked above each other.
- Left-- force control is located on the left of the parent form (or control) of. If there are other child controls with a parent form is also set to dock on the left, then the controls will be stacked next to each other.
- Right-- force control in the parent form (or control) on the right. If there are other child controls with a parent form it is also set to docked on the right, then the controls will be stacked next to each other.
- Fill-- force control in the parent form (or control) above. If there are other same parent child control is also set to form docked above, then control each stacked above each other.
- None-- indicates that the control will operate normally.

Window Style

MaximizeBox : determining whether the upper right corner of the title bar of the window there is maximize box.
- TRUE- is
- FALSE- No

Reference
C # / winform form accommodate different resolution
C # properties window AutoScaleMode
WinForm properties AutoScaleMode
C # AutoSize AutoSizeMode properties
winform Anchor and Dock property

Published 30 original articles · won praise 3 · Views 890

Guess you like

Origin blog.csdn.net/qq_42697866/article/details/102745635