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

Class BaseListViewExtensions

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

Provides extension methods for BaseListView.

public static class BaseListViewExtensions

Inheritance​

object ← BaseListViewExtensions

Methods​

AddItemsAdded<T>(T, Action<IEnumerable<int>>)​

Subscribes to the itemsAdded event.

public static T AddItemsAdded<T>(this T element, Action<IEnumerable<int>> value) where T : BaseListView

Parameters​

element T

The element to modify.

value Action<IEnumerable<int>>

The callback to subscribe.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

AddItemsRemoved<T>(T, Action<IEnumerable<int>>)​

Subscribes to the itemsRemoved event.

public static T AddItemsRemoved<T>(this T element, Action<IEnumerable<int>> value) where T : BaseListView

Parameters​

element T

The element to modify.

value Action<IEnumerable<int>>

The callback to subscribe.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

AddOnAdd<T>(T, Action<BaseListView>)​

Subscribes to the onAdd callback.

public static T AddOnAdd<T>(this T element, Action<BaseListView> value) where T : BaseListView

Parameters​

element T

The element to modify.

value Action<BaseListView>

The callback to add.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

AddOnRemove<T>(T, Action<BaseListView>)​

Subscribes to the onRemove callback.

public static T AddOnRemove<T>(this T element, Action<BaseListView> value) where T : BaseListView

Parameters​

element T

The element to modify.

value Action<BaseListView>

The callback to add.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

AddOverridingAddButtonBehavior<T>(T, Action<BaseListView, Button>)​

Subscribes to the overridingAddButtonBehavior callback.

public static T AddOverridingAddButtonBehavior<T>(this T element, Action<BaseListView, Button> value) where T : BaseListView

Parameters​

element T

The element to modify.

value Action<BaseListView, Button>

The callback to add.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

RemoveItemsAdded<T>(T, Action<IEnumerable<int>>)​

Unsubscribes from the itemsAdded event.

public static T RemoveItemsAdded<T>(this T element, Action<IEnumerable<int>> value) where T : BaseListView

Parameters​

element T

The element to modify.

value Action<IEnumerable<int>>

The callback to remove.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

RemoveItemsRemoved<T>(T, Action<IEnumerable<int>>)​

Unsubscribes from the itemsRemoved event.

public static T RemoveItemsRemoved<T>(this T element, Action<IEnumerable<int>> value) where T : BaseListView

Parameters​

element T

The element to modify.

value Action<IEnumerable<int>>

The callback to remove.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

RemoveOnAdd<T>(T, Action<BaseListView>)​

Unsubscribes from the onAdd callback.

public static T RemoveOnAdd<T>(this T element, Action<BaseListView> value) where T : BaseListView

Parameters​

element T

The element to modify.

value Action<BaseListView>

The callback to remove.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

RemoveOnRemove<T>(T, Action<BaseListView>)​

Unsubscribes from the onRemove callback.

public static T RemoveOnRemove<T>(this T element, Action<BaseListView> value) where T : BaseListView

Parameters​

element T

The element to modify.

value Action<BaseListView>

The callback to remove.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

RemoveOverridingAddButtonBehavior<T>(T, Action<BaseListView, Button>)​

Unsubscribes from the overridingAddButtonBehavior callback.

public static T RemoveOverridingAddButtonBehavior<T>(this T element, Action<BaseListView, Button> value) where T : BaseListView

Parameters​

element T

The element to modify.

value Action<BaseListView, Button>

The callback to remove.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetAllowAdd<T>(T, bool)​

Sets allowAdd.

public static T SetAllowAdd<T>(this T element, bool value) where T : BaseListView

Parameters​

element T

The element to modify.

value bool

When true, the Add button adds an item.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetAllowRemove<T>(T, bool)​

Sets allowRemove.

public static T SetAllowRemove<T>(this T element, bool value) where T : BaseListView

Parameters​

element T

The element to modify.

value bool

When true, the Remove button removes an item.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetBindingSourceSelectionMode<T>(T, BindingSourceSelectionMode)​

Sets bindingSourceSelectionMode.

public static T SetBindingSourceSelectionMode<T>(this T element, BindingSourceSelectionMode value) where T : BaseListView

Parameters​

element T

The element to modify.

value BindingSourceSelectionMode

The binding source selection mode to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetHeaderTitle<T>(T, string)​

Sets headerTitle.

public static T SetHeaderTitle<T>(this T element, string value) where T : BaseListView

Parameters​

element T

The element to modify.

value string

The header title to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

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

Sets makeFooter, replacing any existing callback.

public static T SetMakeFooter<T>(this T element, Func<VisualElement> value) where T : BaseListView

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.

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

Sets makeHeader, replacing any existing callback.

public static T SetMakeHeader<T>(this T element, Func<VisualElement> value) where T : BaseListView

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.

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

Sets makeNoneElement, replacing any existing callback.

public static T SetMakeNoneElement<T>(this T element, Func<VisualElement> value) where T : BaseListView

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.

SetOnAdd<T>(T, Action<BaseListView>)​

Sets onAdd, replacing any existing callback.

public static T SetOnAdd<T>(this T element, Action<BaseListView> value) where T : BaseListView

Parameters​

element T

The element to modify.

value Action<BaseListView>

The callback to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetOnRemove<T>(T, Action<BaseListView>)​

Sets onRemove, replacing any existing callback.

public static T SetOnRemove<T>(this T element, Action<BaseListView> value) where T : BaseListView

Parameters​

element T

The element to modify.

value Action<BaseListView>

The callback to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetOverridingAddButtonBehavior<T>(T, Action<BaseListView, Button>)​

Sets overridingAddButtonBehavior, replacing any existing callback.

public static T SetOverridingAddButtonBehavior<T>(this T element, Action<BaseListView, Button> value) where T : BaseListView

Parameters​

element T

The element to modify.

value Action<BaseListView, Button>

The callback to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetReorderMode<T>(T, ListViewReorderMode)​

Sets reorderMode.

public static T SetReorderMode<T>(this T element, ListViewReorderMode value) where T : BaseListView

Parameters​

element T

The element to modify.

value ListViewReorderMode

The reorder mode to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetShowAddRemoveFooter<T>(T, bool)​

Sets showAddRemoveFooter.

public static T SetShowAddRemoveFooter<T>(this T element, bool value) where T : BaseListView

Parameters​

element T

The element to modify.

value bool

When true, the footer with the Add and Remove buttons is shown.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetShowBoundCollectionSize<T>(T, bool)​

Sets showBoundCollectionSize.

public static T SetShowBoundCollectionSize<T>(this T element, bool value) where T : BaseListView

Parameters​

element T

The element to modify.

value bool

When true, the size of the bound collection is shown.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetShowFoldoutHeader<T>(T, bool)​

Sets showFoldoutHeader.

public static T SetShowFoldoutHeader<T>(this T element, bool value) where T : BaseListView

Parameters​

element T

The element to modify.

value bool

When true, the list is wrapped in a foldout header.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.