C# Класс Open.Core.Common.StackArranger

Arranges child elements within a panel into a stack.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ArrangeHorizontalCalculate System.Windows.Size
ArrangeVerticalCalculate System.Windows.Size
GetMargin System.Windows.Thickness
GetSize System.Windows.Size
IsExcluded bool
UpdateSize void

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

Arrange() публичный Метод

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.
Результат System.Windows.Size

Arrange() публичный Метод

Arranges the specified child/bounds item.
public Arrange ( ElementBounds childBounds ) : void
childBounds ElementBounds The child, with bounds data, to arrange.
Результат void

Arrange() публичный Метод

Arranges the specified set of child/bounds item.
public Arrange ( List childBounds ) : void
childBounds List The collection of child, with bounds data, to arrange.
Результат void

ArrangeCalculate() публичный Метод

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.
Результат System.Windows.Size

ArrangeChildOnCanvas() публичный статический Метод

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. ///
Результат void

Measure() публичный Метод

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. ///
Результат System.Windows.Size

StackArranger() публичный Метод

public StackArranger ( IEnumerable children, Orientation orientation ) : System
children IEnumerable
orientation Orientation
Результат System

StackArranger() публичный Метод

public StackArranger ( IEnumerable children, Orientation orientation, bool>.Func exclude, ArrangeChild arrangeChild ) : System
children IEnumerable
orientation Orientation
exclude bool>.Func
arrangeChild ArrangeChild
Результат System

UpdateSize() публичный статический Метод

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. ///
Результат void