StackPanel.IsContentResizable

Syntax

IsContentResizable: Boolean

Description

The IsContentResizable property determines whether component panels can be resized.

Comments

By default the property is set to False: that is, panels cannot be resized. Property value can be set only from constructor.

To resize a panel, hover the cursor over a space between the panels, a double-sided arrow appears, which can be used to change panel width or height (depending on orientation):

On setting the True value to the property, the scroll bar appears.

Example

To execute the example, create a StackPanel component named stackPanel and add items to the component (see  description of the StackPanel constructor). In the constructor set a value for the IsContentResizable property:

// Enable to resize panels
IsContentResizable: true

Add a handler of the ItemSizeChanged event:

stackPanel.ItemSizeChanged.add(function (sender, args) {
    console.log("height: " + args.Item.getHeight())
});

After executing the example panels cans be resized. The browser console displays height of the resized panel.

See also:

StackPanel