Stack

This post is referring to Vahana 2 (beta version). To check the document for production, please go to vDesigner-v1.0

The “Stack” element allows you to stack or place several overlapping UI elements. Also, a “Stack” can be used as a parent layout to contain other child layouts. By default, the orientation of the stack layout is “vertical,” which can be changed programmatically.

Usage

When to use
You can use the stack layout to:
–> Arrange the UI elements in one-dimensional stack either horizontally or vertically
–> Fit as many as other child layouts
–> Place UI elements with vertical and horizontal orientation
–> Create vertical stack with horizontally aligned elements
–> Create horizontal stack with vertically aligned elements

Stack Configuration

The “Stack” element consists of the following properties:

  • UI Configuration
  • Event Configuration

UI Configuration

For the ?Stack? element, you can configure the following UI properties:

TabProperty NameDescriptionMandatoryNew Default Value
BasicReference NameSpecifies a unique name of the element. At the application level, an element is identified and managed by the reference name.YesStack 1
BasicVisibleAllows you to define the default visibility of the UI element. Nomarked
BasicBusiness RuleClick this list and then select a pre-defined business rule that will determine the element’s visibility. If the user’s action satisfies the condition in the business rule, the application will display or hide the element.

To define the business rule, access the Business Rule Manager module.
No
BasicEnableAllows the user to enable/disable an element. You can decide whether the element needs to be clickable and usable.Nomarked
BasicBusiness RuleClick this list and then select a business rule to make the element active or inactive. If the user’s action satisfies the condition in the business rule, the application will make the element active or inactive in the application.

To define the business rule, access the Business Rule Manager module.
No
UI PropertiesStylesAllows you to select a specific style for the element from the list of pre-defined styles. The vDesigner module offers pre-defined styles that you can apply to the element.NoDefault
UI Properties-BackgroundTypeAllows you to configure the element’s background by providing the following options:
–> Color
–> Image
No
UI Properties-BackgroundColorAllows you to configure a color as the element’s background.No#FFFFFF
UI Properties-BackgroundOpacityOpacity is the degree to which content behind an element is hidden, and is the opposite of transparency.

While configuring a color, you can also define the opacity in the percentage unit.
No100%
UI Properties-BackgroundImage SourceThis box becomes visible after you click the Image tab. To configure an image as the element’s background, you can use one of the following options:
–> URL
–> Asset Library
Yes
UI Properties-BackgroundImage URLThis box becomes visible after you select URL in the Image Source list. In the Image URL box, enter the URL of an image. The application fetches the image from the URL-based location and then displays it as the element’s background.YesURL
UI Properties-BackgroundSelect AssetThis box becomes visible after you select Assets Library in the Image Source list. This property allows you to configure an image as the element’s background from the Assets Manager module. To configure the image:
–> Click the asset library icon (), and the Select Asset dialog box opens.
–> In the Select Asset dialog box, select an image and then click Select, and you successfully configure the image as the element’s background.
Yes
UI Properties-BackgroundElevationAllows you to configure the elevation of the background. The elevation is measured as the relative distance between two surfaces along the Z-axis.No0
UI Properties-BackgroundMarginAllows you to desirably define margin around each side of the element. It provides four different boxes to define the margin outside the right, left, top, and bottom border of the element.No4
UI Properties-BackgroundElement’s AlignmentThis property contains three tabs. You can use these tabs as follows:
1. Left:- By default, this tab is selected. It aligns the element to the left of the page.
2. Center:- If you select this tab, it aligns the element at the center of the page.
3. Right:- If you select this tab, it aligns the element to the right of the page.
NoLeft
UI Properties-Shape & DecorationTypeUnder the Shape and Decoration section, this property has the two following options:

Autofill:- If you select this option, the element will occupy the available space of the parent layout.

Manual:- If you select this option, you can define a specific size of the element.
UI Properties-Shape & DecorationWidth ValueEnter the width of the element in the pixel unit or percentage unit.No100%
UI Properties-Shape & DecorationHeight ValueEnter the height of the element in the pixel unit.No10%
UI Properties-Shape & DecorationXAllows you to move the element along the X-axis; when the value increases, the element moves from left to right.NoShow & Disable
UI Properties-Shape & DecorationYAllows you to move the element along the Y-axis; when the value increases, the element moves from top to bottom.NoShow & Disable
UI Properties-Shape & DecorationScrollableAllows you to configure the scrolling feature as follows:
–> Yes: – Select this option to activate the scrolling feature.

–> No: – Select this option to deactivate the scrolling feature.
Nounamrked
UI Properties-Shape & DecorationBorder RadiusAllows you to define the radius of the element’s corners. Defining the radius of the corner makes the element’s corner round.NoTheme Variable (Border Radius)
UI Properties-Shape & DecorationBorder ColorAllows you to configure the color of the element’s border. To configure the color:
–> In the Border Color box, click the left color box (), and a color canvas open.
–> On the canvas, on the horizontal bar, move the circle to select the color.
–> In the upper section, move the circle to select the tone of the color.
No#c6c6c6
UI Properties-Shape & DecorationOpacityOpacity is the degree to which content behind an element is hidden, and is the opposite of transparency.

While configuring a color, you can also define the opacity in the percentage unit.
No100

Event Configuration

On the “Stack” element, you can configure the following event:

  • onClick
Was this article helpful?
YesNo