C# Class Open.Core.Common.StackArranger

Arranges child elements within a panel into a stack.
Afficher le fichier Open project: philcockfield/Open.TestHarness.SL Class Usage Examples

Private Properties

Свойство Type Description
ArrangeHorizontalCalculate System.Windows.Size
ArrangeVerticalCalculate System.Windows.Size
GetMargin System.Windows.Thickness
GetSize System.Windows.Size
IsExcluded bool
UpdateSize void

Méthodes publiques

Méthode 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

Méthode 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 méthode

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.
Résultat System.Windows.Size

Arrange() public méthode

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

Arrange() public méthode

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

ArrangeCalculate() public méthode

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.
Résultat System.Windows.Size

ArrangeChildOnCanvas() public static méthode

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. ///
Résultat void

Measure() public méthode

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. ///
Résultat System.Windows.Size

StackArranger() public méthode

public StackArranger ( IEnumerable children, Orientation orientation ) : System
children IEnumerable
orientation Orientation
Résultat System

StackArranger() public méthode

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

UpdateSize() public static méthode

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. ///
Résultat void