Interface ILayout2

Represents a layout for the ListView.

Index

Properties

Methods

Properties

public orientation: any

Gets or sets the orientation of the layout.

Methods

public dragLeave()

Called when the ListView finishes a drag operation.

public dragOver(x: number, y: number, dragInfo: number)

Called when the ListView initiates a drag operation.

Parameters

  • x: number

    The x-coordinate of the drag.

  • y: number

    The y-coordinate of the drag.

  • dragInfo: number

    An object that indicates whether the item is selected.

public executeAnimations()

Called when the ListView requests that the ILayout2 execute animations.

public getAdjacent(currentItem: any, pressedKey: Key): any

Determines the next item to receive keyboard focus.

Parameters

  • currentItem: any

    An object that describes the current item. It has these properties: index, type.

  • pressedKey: Key

    The key that was pressed.

Returns

any

An object that describes the next item that should receive focus. It has these properties: index, type.

public hitTest(x: number, y: number): any

Gets the item at the specified hit-test coordinates. These coordinates are absolute coordinates (they are not relative to the layout's content area).

Parameters

  • x: number

    The x-coordinate to test for.

  • y: number

    The y-coordinate to test for.

Returns

any

An object that describes the item at the hit test coordinates. It has these properties: type, index.

public initialize(site: ILayoutSite2, groupsEnabled: boolean)

Sets the rendering site and specifies whether the layout supports groups. This method is called by the ListView to initialize the layout.

Parameters

  • site: ILayoutSite2

    The rendering site for the layout.

  • groupsEnabled: boolean

    Set to true if this layout supports groups; set to false if it does not.

public itemsFromRange(firstPixel: number, lastPixel: number)

Retrieves the indexes of the items in the specified pixel range.

Parameters

  • firstPixel: number

    The first pixel the range of items falls between.

  • lastPixel: number

    The last pixel the range of items falls between.

public layout(tree: any, changedRange: any, modifiedItems: any, modifiedGroups: any): any

Performs a layout pass.

Parameters

  • tree: any

    A structure representing the layout tree that is returned from the ListView.

  • changedRange: any

    An object that lists the index of the first item in the changed item range. This object has these properties: startIndex.

  • modifiedItems: any

    An object that contains the old and new indexes of the items that have been modified in the tree.

  • modifiedGroups: any

    An object that contains the old and new indexes of the group elements that have been modified in the tree.

Returns

any

A Promise that executes after layout is complete, or an object that contains two Promise objects: realizedRangeComplete, layoutComplete.

public setupAnimations()

Called when the ListView requests that the ILayout2 set up animations.

public uninitialize()

Releases resources that were obtained during the call to initialize.