LayoutDefinition Class

Spotfire 14.3 API Reference
Defines the layout structure and content to be applied within a Page.
Inheritance Hierarchy

SystemObject
  Spotfire.Dxp.Application.LayoutLayoutDefinition

Namespace:  Spotfire.Dxp.Application.Layout
Assembly:  Spotfire.Dxp.Application (in Spotfire.Dxp.Application.dll) Version: 65.0.19510.3242 (65.0.19510.3242)
Syntax

C#
public sealed class LayoutDefinition

The LayoutDefinition type exposes the following members.

Constructors

  NameDescription
Public methodLayoutDefinition
Initializes a new instance of the LayoutDefinition class.
Top
Methods

  NameDescription
Public methodAdd(Visual)
Public methodAdd(Visual, Single)
Public methodBeginSideBySideSection
Creates a side-by-side (vertical) section that will be used for subsequent calls to to Add(Visual) or Add(Visual, Single). The section should be ended by calling EndSection.
Public methodBeginSideBySideSection(Single)
Creates a side-by-side (vertical) section that will be used for subsequent calls to to Add(Visual) or Add(Visual, Single). The section should be ended by calling EndSection.
Public methodBeginStackedSection
Creates a stacked (horizontal) section that will be used for subsequent calls to Add(Visual) or Add(Visual, Single). The section should be closed by calling EndSection.
Public methodBeginStackedSection(Single)
Creates a stacked (horizontal) section that will be used for subsequent calls to to Add(Visual) or Add(Visual, Single). The section should be closed by calling EndSection.
Public methodEndSection
Ends the current section. All sections must be ended.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

Each BeginStackedSection/BeginSideBySideSection call splits the space available into two sections either vertically or horizontally. Space within a section is divided amongst the visuals that are actually added so if we make five subsections and only add a visual to one of them it will take the entire space of all the sections.
Examples

C#
public void TwoLevelsStartingHorizontally()
{
    // + - + - + - +
    // | 1 | 2 | 3 |
    // + - + - + - +
    // |     4     |
    // + - - - - - +

    Visual v1 = new VisualMock();
    Visual v2 = new VisualMock();
    Visual v3 = new VisualMock();
    Visual v4 = new VisualMock();

    LayoutDefinition ld = new LayoutDefinition();
    ld.BeginStackedSection();
        ld.BeginSideBySideSection();
            ld.Add(v1);
            ld.Add(v2);
            ld.Add(v3);
        ld.EndSection();
        ld.Add(v4);
    ld.EndSection();
}
public void ThreeLevelsStartingVertically()
{
    // + - - - + - + - +
    // |       |   2   |
    // |       + - + - +
    // |   1   |   3   |
    // |       + - + - +
    // |       | 4 | 5 |
    // + - - - + - + - +

    Visual v1 = new VisualMock();
    Visual v2 = new VisualMock();
    Visual v3 = new VisualMock();
    Visual v4 = new VisualMock();
    Visual v5 = new VisualMock();

    LayoutDefinition ld = new LayoutDefinition();
    ld.BeginSideBySideSection();
        ld.Add(v1);
        ld.BeginStackedSection();
            ld.Add(v2);
            ld.Add(v3);
            ld.BeginSideBySideSection();
                ld.Add(v4);
                ld.Add(v5);
            ld.EndSection();
        ld.EndSection();
    ld.EndSection();
}
Version Information

Supported in: 14.3, 14.2, 14.1, 14.0, 12.5, 12.4, 12.3, 12.2, 12.1, 12.0, 11.8
See Also

Reference