Поделиться через


ListView.forceLayout method

Forces the ListView to update its layout. Use this method when you make the ListView visible again after its style.display property had been set to "none".

Syntax

listView.forceLayout();

Parameters

This method has no parameters.

Return value

This method does not return a value.

Remarks

When you set the style.display property of a ListView or its parent elements to "none", the app discards layout information about those elements. When you change the value of the display property back to a style that makes everything visible again, the app will layout all the elements, but the ListView won't receive info about the current layout and will have an invalid layout. You can fix the issue by calling this method when you make the ListView visible again.

Requirements

Minimum WinJS version

WinJS 3.0

Namespace

WinJS.UI

See also

ListView

display