# Compositions

GacUI offer a rich set of predefined compositions including:
- **Bounds**: Allow specifying absolute or relation location to the parent.
- **Stack** + **StackItem**: Locate children from one side to another.
- **Flow** + **FlowItem**: Locale children from one side to another, and create a new line when the space is not enough.
- **RepeatStack** and **RepeatFlow**: **Stack** and **Flow** with data binding, which maintain **StackItem** and **FlowItem** in real-time by observing a collection.
- **Table** + **Cell** + **RowSplitter** + **ColumnSplitter**: Local children inside a table with sizing configuration of rows and columns.
- **SharedSizeRoot** + **SharedSizeItem**: Categorize items inside a root, and keep items in the same size if they are in the same category
- **Responsive** series: Locale children in different ways according to the size of the parent.

## Bounds

- Source code: [kb_compositions](https://github.com/vczh-libraries/Release/blob/master/SampleForDoc/GacUI/XmlRes/kb_compositions/Bounds.xml)
- ![](https://gaclib.net/doc/gacui/kb_compositions_bounds.gif)

## Stack

- Source code: [kb_compositions](https://github.com/vczh-libraries/Release/blob/master/SampleForDoc/GacUI/XmlRes/kb_compositions/Stack.xml)
- ![](https://gaclib.net/doc/gacui/kb_compositions_stack.gif)

## Flow

- Source code: [kb_compositions](https://github.com/vczh-libraries/Release/blob/master/SampleForDoc/GacUI/XmlRes/kb_compositions/Flow.xml)
- ![](https://gaclib.net/doc/gacui/kb_compositions_flow.gif)

## Table

- Source code: [kb_compositions](https://github.com/vczh-libraries/Release/blob/master/SampleForDoc/GacUI/XmlRes/kb_compositions/Table.xml)
- ![](https://gaclib.net/doc/gacui/kb_compositions_table.gif)

## SharedSize

- Source code: [kb_compositions](https://github.com/vczh-libraries/Release/blob/master/SampleForDoc/GacUI/XmlRes/kb_compositions/SharedSize.xml)
- ![](https://gaclib.net/doc/gacui/kb_compositions_sharedsize.gif)

## Responsive series

Ribbon:

- Source code: [Tutorial/GacUI_ControlTemplate/BlackSkin/UI/FullControlTest/DocumentEditorRibbon.xml](https://github.com/vczh-libraries/Release/blob/master/Tutorial/GacUI_ControlTemplate/BlackSkin/UI/FullControlTest/DocumentEditorRibbon.xml)
- ![](https://gaclib.net/doc/gacui/kb_compositions_responsive_2.gif)

Responsive Layout:

- Source code: [Tutorial/GacUI_Layout/Responsive2/UI/Resource.xml](https://github.com/vczh-libraries/Release/blob/master/Tutorial/GacUI_Layout/Responsive2/UI/Resource.xml)
- ![](https://gaclib.net/doc/gacui/kb_compositions_responsive_2.gif)

