dotnetmonitor.com

 
Index
Previous
Next

 

MinimumSize: the bare minimum size a control can be set to
  • MaximumSize: the maximum size a control can be set to
  • PreferredSize: the size a control prefers to be - this is implemented by calling GetPreferredSize(0,0)
  • AutoSize: Boolean specifying whether or not the control should be set to it's preferred size
  • public virtual Size GetPreferredSize(Size constrainingSize) - This method returns the "preferredSize" of the control given some size contstraints. If the size passed in is 0 in any dimension or Int32.MaxValue, this implies that the size is not constrained in that dimension.
    • GetPreferredSize(0,0) Unconstrained in width,height
    • GetPreferredSize(0,h) Constrained in height by "h", unconstrained in width
    • GetPreferredSize(w,0) Constrained in width by "w", unconstrained in height
    • GetPreferredSize(w,h) Constrained in width by "w", constrained in height by "h"

    Terms
    Docking Anchor Layout
    What happens when I have Dock and Anchors that conflict?
    Dock Scenarios
    Padding Margin
    You have a perf problem with Layout - how to diagnose?