C# Class Open.Core.Common.StackArranger

Arranges child elements within a panel into a stack.
Datei anzeigen Open project: philcockfield/Open.TestHarness.SL Class Usage Examples

Private Properties

Property Type Description
ArrangeHorizontalCalculate System.Windows.Size
ArrangeVerticalCalculate System.Windows.Size
GetMargin System.Windows.Thickness
GetSize System.Windows.Size
IsExcluded bool
UpdateSize void

Public Methods

Method Description
Arrange ( Size finalSize ) : Size

Provides the behavior for the "arrange" pass of the layout.

Call the 'Measure' method before invoking 'Arrange'.

Arrange ( ElementBounds childBounds ) : void

Arranges the specified child/bounds item.

Arrange ( List childBounds ) : void

Arranges the specified set of child/bounds item.

ArrangeCalculate ( Size finalSize, List &returnBounds ) : Size

Calculates the position of each item within the Panel's Children collection.

This method is used by the 'Arrange' method.Call the 'Measure' method before invoking 'ArrangeCalculate'.

ArrangeChildOnCanvas ( UIElement element, Rect bounds ) : void

Arranges an element within a canvas.

Measure ( Size availableSize ) : Size

Provides the behavior for the "measure" pass of the layout.

StackArranger ( IEnumerable children, Orientation orientation ) : System
StackArranger ( IEnumerable children, Orientation orientation, bool>.Func exclude, ArrangeChild arrangeChild ) : System
UpdateSize ( UIElement element, Rect bounds ) : void

Updates the size of the element based on the bounds accounting for margins.

Private Methods

Method Description
ArrangeHorizontalCalculate ( Size finalSize, List &returnBounds ) : Size
ArrangeVerticalCalculate ( Size finalSize, List &returnBounds ) : Size
GetMargin ( UIElement element ) : System.Windows.Thickness
GetSize ( UIElement child, Size finalSize, System.Windows.Thickness margin ) : Size
IsExcluded ( UIElement element ) : bool
UpdateSize ( UIElement element, Rect bounds, System.Windows.Thickness margin ) : void

Method Details

Arrange() public method

Provides the behavior for the "arrange" pass of the layout.
Call the 'Measure' method before invoking 'Arrange'.
public Arrange ( Size finalSize ) : Size
finalSize System.Windows.Size The final area within the parent that this object should use to arrange itself and its children.
return System.Windows.Size

Arrange() public method

Arranges the specified child/bounds item.
public Arrange ( ElementBounds childBounds ) : void
childBounds ElementBounds The child, with bounds data, to arrange.
return void

Arrange() public method

Arranges the specified set of child/bounds item.
public Arrange ( List childBounds ) : void
childBounds List The collection of child, with bounds data, to arrange.
return void

ArrangeCalculate() public method

Calculates the position of each item within the Panel's Children collection.
This method is used by the 'Arrange' method. Call the 'Measure' method before invoking 'ArrangeCalculate'.
public ArrangeCalculate ( Size finalSize, List &returnBounds ) : Size
finalSize System.Windows.Size The final area within the parent that this object should use to arrange itself and its children.
returnBounds List Returns a list of element bounds corresponding, in order, to each child within the Panel.
return System.Windows.Size

ArrangeChildOnCanvas() public static method

Arranges an element within a canvas.
public static ArrangeChildOnCanvas ( UIElement element, Rect bounds ) : void
element UIElement The element to arrange.
bounds System.Windows.Rect /// The dimensions and positon of the element to place. /// It is assumed that the margin values of the child element is included within the bounds values. ///
return void

Measure() public method

Provides the behavior for the "measure" pass of the layout.
public Measure ( Size availableSize ) : Size
availableSize System.Windows.Size /// The available size that this object can give to child objects. Infinity can be specified as a /// value to indicate that the object will size to whatever content is available. ///
return System.Windows.Size

StackArranger() public method

public StackArranger ( IEnumerable children, Orientation orientation ) : System
children IEnumerable
orientation Orientation
return System

StackArranger() public method

public StackArranger ( IEnumerable children, Orientation orientation, bool>.Func exclude, ArrangeChild arrangeChild ) : System
children IEnumerable
orientation Orientation
exclude bool>.Func
arrangeChild ArrangeChild
return System

UpdateSize() public static method

Updates the size of the element based on the bounds accounting for margins.
public static UpdateSize ( UIElement element, Rect bounds ) : void
element UIElement The element to size.
bounds System.Windows.Rect /// The dimensions and positon of the element. /// It is assumed that the margin values of the child element is included within the bounds values. ///
return void