DynamicLayout Class |
Namespace: Eto.Forms
The DynamicLayout type exposes the following members.
| Name | Description | |
|---|---|---|
| DynamicLayout |
Initializes a new instance of the DynamicLayout class.
| |
| DynamicLayout(DynamicRow) |
Initializes a new instance of the DynamicLayout class with the specified rows
| |
| DynamicLayout(IEnumerableDynamicRow) |
Initializes a new instance of the DynamicLayout class with the specified rows
|
| Name | Description | |
|---|---|---|
| Controls |
Gets an enumeration of controls that are directly contained by this container
(Overrides PanelControls.) | |
| DefaultPadding |
Gets or sets the default padding for all child DynamicTable instances (vertical sections)
| |
| DefaultSpacing |
Gets or sets the default spacing for all cells in the layout
| |
| IsCreated |
Gets a value indicating whether the layout has been created
| |
| Padding |
Gets or sets the padding around the entire content of the layout
| |
| Rows |
Gets or sets the top level rows in the layout
| |
| Spacing |
Gets or sets the spacing between the first level of cells
| |
| VisualControls |
Gets an enumeration of controls that are in the visual tree.
(Overrides ControlVisualControls.) |
| Name | Description | |
|---|---|---|
| Add |
Add the control with the optional scaling
| |
| AddAutoSized |
Adds a control to the layout with its preferred size instead of taking the entire space of the cell
| |
| AddCentered |
Adds a control centered in a new vertical section
| |
| AddColumn |
Adds a column of controls in a new vertical section
| |
| AddRange(Control) |
Adds a list of controls
| |
| AddRange(IEnumerableControl) |
Adds a list of controls
| |
| AddRow |
Adds a new row of controls to the current vertical section
| |
| AddSeparateColumn(Control) |
Adds a separate vertical column of items in a new vertical section
| |
| AddSeparateColumn(NullablePadding, NullableInt32, NullableBoolean, NullableBoolean, IEnumerableControl) |
Adds a separate vertical column of items in a new vertical section
| |
| AddSeparateRow(Control) |
Adds a separate horizontal row of items in a new vertical section
| |
| AddSeparateRow(NullablePadding, NullableSize, NullableBoolean, NullableBoolean, IEnumerableControl) |
Adds a separate horizontal row of items in a new vertical section
| |
| AddSpace |
Adds an empty space. Equivalent to calling Add(null);
| |
| BeginCentered |
Creates a new section where all controls will be centered together.
| |
| BeginGroup |
Begins a the group section in the dynamic layout with a title.
| |
| BeginHorizontal |
Begins a new horizontal row section
| |
| BeginScrollable |
Begins a the scrollable section in the dynamic layout with a specified border.
| |
| BeginVertical |
Begins a new vertical section in the layout
| |
| Clear |
Clears the layout so it can be recreated
| |
| Create |
Creates the layout content
| |
| EndBeginHorizontal |
Ends the current horizontal section, then begins a new horizontal section with a new row
| |
| EndBeginVertical |
Ends the current vertical section, then begins a new vertical section
| |
| EndCentered |
Ends the current centered section.
| |
| EndGroup |
Ends a group.
| |
| EndHorizontal |
Ends the current horizontal section
| |
| EndScrollable |
Ends a scrollable section.
| |
| EndVertical |
Ends the current vertical section
| |
| OnLoad |
Raises the Load event, and creates the layout if it has not been created
(Overrides ContainerOnLoad(EventArgs).) | |
| OnPreLoad |
Raises the PreLoad event, and creates the layout if it has not been created
(Overrides ContainerOnPreLoad(EventArgs).) |
var layout = new DynamicLayout(); layout.BeginHorizontal(); layout.Add(new Label { Text = "My Label" }); layout.Add(new TextBox()); layout.EndHorizontal(); layout.BeginHorizontal() layout.Add(new Label { Text = "Vertical controls:" }); layout.BeginVertical(padding: new Padding(10)); layout.Add(new TextBox()); layout.Add(new Label { Text = "Some text below the text box" }); layout.EndVertical(); layout.EndHorizontal();
var layout = new DynamicLayout( new DynamicRow( new Label { Text = "My Label" }, new TextBox() ), new DynamicRow( new Label { Text = "Vertical controls:" }, new DynamicTable( new TextBox(), new Label { Text = "Some text below the text box" } ) { Padding = new Padding(10) } ) );
var layout = new DynamicLayout { Rows = { new DynamicRow { Items = { new Label { Text = "My Label" }, new TextBox() } }, new DynamicRow { Items = { new Label { Text = "Vertical controls:" }, new DynamicTable { Padding = new Padding(10), Rows = { new TextBox(), new Label { Text = "Some text below the text box" } } } } } } };