StackPanel.IsHorisontal

Syntax

IsHorisontal: Boolean

Description

The IsHorisontal property determines if components must be positioned vertically or horizontally.

Comments

If the property is set to True components are positioned horizontally, otherwise vertical positioning is used. By default the property is set to False.

Horizontally:

Vertically (default):

Example

To execute the example, create a StackPanel component named stackPanel and add elements to the component (see description of the StackPanel constructor). Add a button clicking which changes panels positions:

    var but1 = new PP.Ui.Button(
     {
         Content: "Change orientation",
         ParentNode: document.getElementById("but1"),
         Click: change
     })
     function change()
     {
         if (stackPanel.getIsHorisontal()) stackPanel.setIsHorisontal(false);
         else stackPanel.setIsHorisontal(true);
     }

After executing the example clicking the Change Orientation button changes panels' position.

See also:

StackPanel