Persistate API documentation
PLayoutEngine Class
NamespacesPersistate.UI.DesktopPLayoutEngine

[This is preliminary documentation and is subject to change.]

This class performs layout duties for all PFittedPanel objects.
Declaration Syntax
C#
public class PLayoutEngine : LayoutEngine
Members
All MembersMethods



IconMemberDescription
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
InitLayout(Object, BoundsSpecified)
Initializes the layout engine.
(Inherited from LayoutEngine.)
Layout(Object, LayoutEventArgs)
Lays out controls within a container, normally a PFittedPanel, resizing and repositioning as necessary.
(Overrides LayoutEngine.Layout(Object, LayoutEventArgs).)
MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
Remarks

PFittedPanels are used for the content panels for all PContainers. This layout engine is basically quite simple - starting from the designed positions, it repositions and resizes controls in proportion to the ratio of the current width and height to the designed width and height.

That said, there are a few twists. It works best with IPControls, and takes into account the ShouldResize value to determine how controls should be resized. Persistate manages the default values of these as you would expect. Docked controls are handled correctly, with the free edge positioned proportionally.

An important feature is that for all controls which are above the highest control which will resize vertically, the maximum vertical distance between them is the original designed distance. This gives more room to expand for the vertically resizable controls below then, and means that you should always position such controls, for example subgrids or text areas, at the bottom of forms.

Inheritance Hierarchy
Object
LayoutEngine
 PLayoutEngine

Assembly: Persistate.UI.Desktop (Module: Persistate.UI.Desktop) Version: 0.6.1.20 (0.6.1.20)