Class ListViewModel<T>
A view model for managing items in a ListView.
Inheritance
ListViewModel<T>
Implements
IEnumerable<T>
Inherited Members
Namespace: Phoenix.BotBrain.Controls
Assembly: Phoenix.Plugin.BotBrain.Lists.dll
Syntax
public class ListViewModel<T> : TreeViewModel<T>, INotifyPropertyChanged, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, INotifyCollectionChanged, IListViewModel, ICanMoveItemsWithin, ICanMoveItemsTo where T : class
Type Parameters
Name | Description |
---|---|
T | The item type. |
Remarks
Initializes a new instance of the ListViewModel<T> class.
Constructors
View SourceListViewModel(IServiceProvider?)
A view model for managing items in a ListView.
Declaration
public ListViewModel(IServiceProvider? services = null)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | services | The service provider for creating items. |
Remarks
Initializes a new instance of the ListViewModel<T> class.
Properties
View SourceSupportsCopy
Gets or sets a value indicating whether or not items can be copied.
Declaration
public bool SupportsCopy { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
View SourceCanAppendItems(object)
Determines if the given items can be moved or copied into this object.
Declaration
public bool CanAppendItems(object dragData)
Parameters
Type | Name | Description |
---|---|---|
object | dragData | The items. |
Returns
Type | Description |
---|---|
bool | A boolean. |
CopyItemsTo(object)
Copies the given items into this object.
Declaration
public void CopyItemsTo(object dragData)
Parameters
Type | Name | Description |
---|---|---|
object | dragData | The items. |
CopyItemsTo(object, int)
Copies the given items into this object.
Declaration
public void CopyItemsTo(object dragData, int dropIndex)
Parameters
Type | Name | Description |
---|---|---|
object | dragData | The items. |
int | dropIndex | The index where the items were dropped. |
MoveItemsTo(object)
Moves the given items into this object.
Declaration
public void MoveItemsTo(object dragData)
Parameters
Type | Name | Description |
---|---|---|
object | dragData | The items. |
MoveItemsTo(object, int)
Moves the given items into this object.
Declaration
public void MoveItemsTo(object dragData, int dropIndex)
Parameters
Type | Name | Description |
---|---|---|
object | dragData | The items. |
int | dropIndex | The index where the items were dropped. |