FGX.Layout.Types

Материал из FGX Native Докуметации
Перейти к навигации Перейти к поиску

Вспомогательные типы для реализации контейнера FlexBox.

Классы и интерфейсы

TfgChildrenAlignment

Настройки выравнивания дочерних контролов

TfgPadding

Настройки внутренних отступов.

IFGXFlexContainer

Маркер, что контрол является контейнером FlexBox.

IFGXFlexVirtualContent

Этот интерфейс описывает, что контрол имеет виртуальный контент. В реализации Flex, каждый контрол библиотеки соответствует DIV блоку. Виртуальность означает, что контрола в данном случае нет, однако, нам очень нужно, чтобы у него были свои параметры выравнивания по флексу. Это нужно для контролов, у которых есть контент, отличающийся от размера контрола.

Types

TfgFlexDirection

Controls the direction in which children are laid out.

TfgJustifyContent

The JustifyContent property describes how to align children within the main axis of a container. For example, you can use this property to center a child horizontally within a container with FlexDirection = Row or vertically within a container with FlexDirection = Column.

TfgFlexWrap

The FlexWrap property is set on containers and controls what happens when children overflow the size of the container along the main axis.

If a container specifies FlexWrap = Wrap then its children will wrap to the next line instead of overflowing. The next line will have the same FlexDirection as the first line and will appear next to the first line along the cross axis – below it if using FlexDirection = Column and to the right if using FlexDirection = Row.

TfgAlignItems

The AlignItems property describes how to align children along the cross axis of their container. AlignItems is very similar to JustifyContent but instead of applying to the main axis, it applies to the cross axis.

The only non-obvious option of the four is Stretch. With AlignItems = Stretch you instruct children to match the size of their container in the cross axis.

TfgAlignContent

The AlignContent property is used to control how multiple lines of content are aligned within a container which uses FlexWrap = wrap.