Class ItemsControlDragDropTarget<TItemsControl, TItemContainerType>
A control that enabled drag and drop operations on an TItemsControl.
Inheritance
Implements
Inherited Members
Namespace: System.Windows.Controls
Assembly: OpenSilver.Controls.Toolkit.dll
Syntax
public abstract class ItemsControlDragDropTarget<TItemsControl, TItemContainerType> : DragDropTarget<TItemsControl, TItemContainerType>, IControl, IFrameworkElement, IUIElement, IDependencyObject, IAcceptDrop where TItemsControl : ItemsControl where TItemContainerType : FrameworkElement
Type Parameters
Name | Description |
---|---|
TItemsControl | The type of the control that contains the items that can be dragged. |
TItemContainerType | The type of the item container. |
Fields
| Improve this Doc View SourceScrollItemAnimationDurationProperty
Identifies the ScrollItemIntoViewAnimationDuration dependency property.
Declaration
public static readonly DependencyProperty ScrollItemAnimationDurationProperty
Field Value
Type | Description |
---|---|
Dependency |
Properties
| Improve this Doc View SourceScrollItemAnimationDuration
Gets or sets the duration to use to animate an item into view.
Declaration
public Duration ScrollItemAnimationDuration { get; set; }
Property Value
Type | Description |
---|---|
Duration |
Methods
| Improve this Doc View SourceAddItem(TItemsControl, Object)
Adds an item to an items control.
Declaration
protected override void AddItem(TItemsControl itemsControl, object data)
Parameters
Type | Name | Description |
---|---|---|
TItems |
itemsControl | The items control. |
System. |
data | The data to be inserted. |
Overrides
CanAddItem(TItemsControl, Object)
Returns a value indicating whether an item can be added to the items control.
Declaration
protected override bool CanAddItem(TItemsControl itemsControl, object data)
Parameters
Type | Name | Description |
---|---|---|
TItems |
itemsControl | The items control. |
System. |
data | The data to be added. |
Returns
Type | Description |
---|---|
System. |
A value indicating whether an item can be added to the items control. |
Overrides
CanRemove(TItemsControl)
Returns a value indicating whether an item can be removed from the items control.
Declaration
protected override bool CanRemove(TItemsControl itemsControl)
Parameters
Type | Name | Description |
---|---|---|
TItems |
itemsControl | The items control. |
Returns
Type | Description |
---|---|
System. |
A value indicating whether an item can be removed from the items control. |
Overrides
CanScroll(TItemsControl)
Returns a value indicating whether a given items control can scroll.
Declaration
protected override bool CanScroll(TItemsControl itemsControl)
Parameters
Type | Name | Description |
---|---|---|
TItems |
itemsControl | The items control. |
Returns
Type | Description |
---|---|
System. |
The value indicating whether the given items control can scroll. |
Overrides
ContainerFromIndex(TItemsControl, Int32)
Retrieves the item container at a given index.
Declaration
protected override TItemContainerType ContainerFromIndex(TItemsControl itemsControl, int index)
Parameters
Type | Name | Description |
---|---|---|
TItems |
itemsControl | The items control. |
System. |
index | The index at which to retrieve the container. |
Returns
Type | Description |
---|---|
TItem |
The item container at a given index. |
Overrides
GetItemCount(TItemsControl)
Retrieves the number of items in an items control.
Declaration
protected override int GetItemCount(TItemsControl itemsControl)
Parameters
Type | Name | Description |
---|---|---|
TItems |
itemsControl | The items control. |
Returns
Type | Description |
---|---|
System. |
The number of items in the items control. |
Overrides
GetItemsHost(TItemsControl)
Retrieves the items host for a given items control.
Declaration
protected override Panel GetItemsHost(TItemsControl itemsControl)
Parameters
Type | Name | Description |
---|---|---|
TItems |
itemsControl | The items control. |
Returns
Type | Description |
---|---|
Panel | The items host for a given items control. |
Overrides
IndexFromContainer(TItemsControl, TItemContainerType)
Retrieves the index of an item container.
Declaration
protected override int? IndexFromContainer(TItemsControl itemsControl, TItemContainerType itemContainer)
Parameters
Type | Name | Description |
---|---|---|
TItems |
itemsControl | The items control. |
TItem |
itemContainer | The item container. |
Returns
Type | Description |
---|---|
System. |
The index of an item container. |
Overrides
InsertItem(TItemsControl, Int32, Object)
Inserts an item into an items control.
Declaration
protected override void InsertItem(TItemsControl itemsControl, int index, object data)
Parameters
Type | Name | Description |
---|---|---|
TItems |
itemsControl | The items control. |
System. |
index | The index at which to insert the item. |
System. |
data | The data to be inserted. |
Overrides
IsItemContainerOfItemsControl(TItemsControl, DependencyObject)
Returns a value indicating whether a container belongs to an items control.
Declaration
protected override bool IsItemContainerOfItemsControl(TItemsControl itemsControl, DependencyObject itemContainer)
Parameters
Type | Name | Description |
---|---|---|
TItems |
itemsControl | The items control. |
Dependency |
itemContainer | The item container. |
Returns
Type | Description |
---|---|
System. |
A value indicating whether a container belongs to an items control. |
Overrides
ItemFromContainer(TItemsControl, TItemContainerType)
Gets the item from an item container.
Declaration
protected override object ItemFromContainer(TItemsControl itemsControl, TItemContainerType itemContainer)
Parameters
Type | Name | Description |
---|---|---|
TItems |
itemsControl | The items control. |
TItem |
itemContainer | The item container. |
Returns
Type | Description |
---|---|
System. |
The data contained by the item container. |
Overrides
RemoveItem(TItemsControl, Object)
Removes an item from an items control.
Declaration
protected override void RemoveItem(TItemsControl itemsControl, object data)
Parameters
Type | Name | Description |
---|---|---|
TItems |
itemsControl | The items control. |
System. |
data | The data to be removed. |
Overrides
RemoveItemAtIndex(TItemsControl, Int32)
Removes an item from an items control by index.
Declaration
protected override void RemoveItemAtIndex(TItemsControl itemsControl, int index)
Parameters
Type | Name | Description |
---|---|---|
TItems |
itemsControl | The items control. |
System. |
index | The index of the item to be removed. |
Overrides
ScrollIntoView(TItemsControl, TItemContainerType)
Scrolls a given item container into the view.
Declaration
protected override void ScrollIntoView(TItemsControl itemsControl, TItemContainerType itemContainer)
Parameters
Type | Name | Description |
---|---|---|
TItems |
itemsControl | The items control that contains the item container. |
TItem |
itemContainer | The item container to scroll into view. |