Перейти к основному содержимому

Class ListViewExtensions

Namespace: Aspid.FastTools.UIElements
Assembly: Aspid.FastTools.dll

Provides extension methods for ListView.

public static class ListViewExtensions

Inheritance​

object ← ListViewExtensions

Methods​

AddBindItem<T>(T, Action<VisualElement, int>)​

Subscribes to the bindItem callback.

public static T AddBindItem<T>(this T element, Action<VisualElement, int> value) where T : ListView

Parameters​

element T

The element to modify.

value Action<VisualElement, int>

The callback to add.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

AddDestroyItem<T>(T, Action<VisualElement>)​

Subscribes to the destroyItem callback.

public static T AddDestroyItem<T>(this T element, Action<VisualElement> value) where T : ListView

Parameters​

element T

The element to modify.

value Action<VisualElement>

The callback to add.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

AddUnbindItem<T>(T, Action<VisualElement, int>)​

Subscribes to the unbindItem callback.

public static T AddUnbindItem<T>(this T element, Action<VisualElement, int> value) where T : ListView

Parameters​

element T

The element to modify.

value Action<VisualElement, int>

The callback invoked to release bindings from a list item element.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

RemoveBindItem<T>(T, Action<VisualElement, int>)​

Unsubscribes from the bindItem callback.

public static T RemoveBindItem<T>(this T element, Action<VisualElement, int> value) where T : ListView

Parameters​

element T

The element to modify.

value Action<VisualElement, int>

The callback to remove.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

RemoveDestroyItem<T>(T, Action<VisualElement>)​

Unsubscribes from the destroyItem callback.

public static T RemoveDestroyItem<T>(this T element, Action<VisualElement> value) where T : ListView

Parameters​

element T

The element to modify.

value Action<VisualElement>

The callback to remove.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

RemoveUnbindItem<T>(T, Action<VisualElement, int>)​

Unsubscribes from the unbindItem callback.

public static T RemoveUnbindItem<T>(this T element, Action<VisualElement, int> value) where T : ListView

Parameters​

element T

The element to modify.

value Action<VisualElement, int>

The callback to remove.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetBindItem<T>(T, Action<VisualElement, int>)​

Sets bindItem, replacing any existing callback.

public static T SetBindItem<T>(this T element, Action<VisualElement, int> value) where T : ListView

Parameters​

element T

The element to modify.

value Action<VisualElement, int>

The callback to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetDestroyItem<T>(T, Action<VisualElement>)​

Sets destroyItem, replacing any existing callback.

public static T SetDestroyItem<T>(this T element, Action<VisualElement> value) where T : ListView

Parameters​

element T

The element to modify.

value Action<VisualElement>

The callback to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetItemTemplate<T>(T, VisualTreeAsset)​

Sets itemTemplate.

public static T SetItemTemplate<T>(this T element, VisualTreeAsset value) where T : ListView

Parameters​

element T

The element to modify.

value VisualTreeAsset

The UXML template to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetMakeItem<T>(T, Func<VisualElement>)​

Sets makeItem, replacing any existing callback.

public static T SetMakeItem<T>(this T element, Func<VisualElement> value) where T : ListView

Parameters​

element T

The element to modify.

value Func<VisualElement>

The callback to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetUnbindItem<T>(T, Action<VisualElement, int>)​

Sets unbindItem, replacing any existing callback.

public static T SetUnbindItem<T>(this T element, Action<VisualElement, int> value) where T : ListView

Parameters​

element T

The element to modify.

value Action<VisualElement, int>

The callback to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.