Class DataPointSeriesDragDropTarget
A control that enabled drag and drop operations on an Chart.
Inheritance
Implements
Inherited Members
Namespace: System.Windows.Controls.DataVisualization.Charting
Assembly: OpenSilver.Controls.DataVisualization.Toolkit.dll
Syntax
[TemplatePart(Name = "DragContainer", Type = typeof(Canvas))]
[TemplatePart(Name = "DragDecorator", Type = typeof(DragDecorator))]
[TemplatePart(Name = "InsertionIndicator", Type = typeof(Path))]
[TemplatePart(Name = "InsertionIndicatorContainer", Type = typeof(Canvas))]
[TemplatePart(Name = "DragPopup", Type = typeof(Popup))]
public class DataPointSeriesDragDropTarget : DragDropTarget<DataPointSeries, DataPoint>, IControl, IFrameworkElement, IUIElement, IDependencyObject, IAcceptDrop
Constructors
| Improve this Doc View SourceDataPointSeriesDragDropTarget()
Initializes a new instance of the DataPointSeriesDragDropTarget.
Declaration
public DataPointSeriesDragDropTarget()
Properties
| Improve this Doc View SourceChart
Gets the chart object.
Declaration
protected Chart Chart { get; }
Property Value
Type | Description |
---|---|
Chart |
Methods
| Improve this Doc View SourceAddItem(DataPointSeries, Object)
Adds an item to an items control.
Declaration
protected override void AddItem(DataPointSeries itemsControl, object data)
Parameters
Type | Name | Description |
---|---|---|
DataPointSeries | itemsControl | The items control. |
System.Object | data | The data to be inserted. |
Overrides
CanAddItem(DataPointSeries, Object)
Returns a value indicating whether an item can be added to the items control.
Declaration
protected override bool CanAddItem(DataPointSeries itemsControl, object data)
Parameters
Type | Name | Description |
---|---|---|
DataPointSeries | itemsControl | The items control. |
System.Object | data | The data to be added. |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether an item can be added to the items control. |
Overrides
CanRemove(DataPointSeries)
Returns a value indicating whether an item can be removed from the items control.
Declaration
protected override bool CanRemove(DataPointSeries itemsControl)
Parameters
Type | Name | Description |
---|---|---|
DataPointSeries | itemsControl | The items control. |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether an item can be removed from the items control. |
Overrides
ContainerFromIndex(DataPointSeries, Int32)
Retrieves the item container at a given index.
Declaration
protected override DataPoint ContainerFromIndex(DataPointSeries itemsControl, int index)
Parameters
Type | Name | Description |
---|---|---|
DataPointSeries | itemsControl | The items control. |
System.Int32 | index | The index at which to retrieve the container. |
Returns
Type | Description |
---|---|
DataPoint | The item container at a given index. |
Overrides
GetDropTarget(DragEventArgs)
Detects whether an item is being dragged over a legend item and selects the owner series as the drop target.
Declaration
protected override DataPointSeries GetDropTarget(DragEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DragEventArgs | args | Information about the drag event. |
Returns
Type | Description |
---|---|
DataPointSeries | The drop target. |
Overrides
GetItemCount(DataPointSeries)
Gets the number of items in an items control.
Declaration
protected override int GetItemCount(DataPointSeries itemsControl)
Parameters
Type | Name | Description |
---|---|---|
DataPointSeries | itemsControl | The items control. |
Returns
Type | Description |
---|---|
System.Int32 | The number of items in the items control. |
Overrides
GetItemsControlAncestor(DependencyObject)
Retrieves the data point series that contains a dependency object.
Declaration
protected override DataPointSeries GetItemsControlAncestor(DependencyObject dependencyObject)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | dependencyObject | The dependency object. |
Returns
Type | Description |
---|---|
DataPointSeries | The data point series ancestor of a given object. |
Overrides
GetItemsHost(DataPointSeries)
Retrieves the items host for a given items control.
Declaration
protected override Panel GetItemsHost(DataPointSeries itemsControl)
Parameters
Type | Name | Description |
---|---|---|
DataPointSeries | itemsControl | The items control. |
Returns
Type | Description |
---|---|
Panel | The items host for a given items control. |
Overrides
IndexFromContainer(DataPointSeries, DataPoint)
Retrieves the index of an item container.
Declaration
protected override int? IndexFromContainer(DataPointSeries itemsControl, DataPoint itemContainer)
Parameters
Type | Name | Description |
---|---|---|
DataPointSeries | itemsControl | The items control. |
DataPoint | itemContainer | The item container. |
Returns
Type | Description |
---|---|
System.Nullable<System.Int32> | The index of an item container. |
Overrides
InsertItem(DataPointSeries, Int32, Object)
Inserts an item into an items control.
Declaration
protected override void InsertItem(DataPointSeries itemsControl, int index, object data)
Parameters
Type | Name | Description |
---|---|---|
DataPointSeries | itemsControl | The items control. |
System.Int32 | index | The index at which to insert the item. |
System.Object | data | The data to be inserted. |
Overrides
IsItemContainerOfItemsControl(DataPointSeries, DependencyObject)
Returns a value indicating whether a container belongs to an items control.
Declaration
protected override bool IsItemContainerOfItemsControl(DataPointSeries itemsControl, DependencyObject itemContainer)
Parameters
Type | Name | Description |
---|---|---|
DataPointSeries | itemsControl | The items control. |
DependencyObject | itemContainer | The item container. |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether a container belongs to an items control. |
Overrides
ItemFromContainer(DataPointSeries, DataPoint)
Gets the item from an item container.
Declaration
protected override object ItemFromContainer(DataPointSeries itemsControl, DataPoint itemContainer)
Parameters
Type | Name | Description |
---|---|---|
DataPointSeries | itemsControl | The items control. |
DataPoint | itemContainer | The item container. |
Returns
Type | Description |
---|---|
System.Object | The data contained by the item container. |
Overrides
OnContentChanged(Object, Object)
Ensures that the content property is set to a Chart object.
Declaration
protected override void OnContentChanged(object oldContent, object newContent)
Parameters
Type | Name | Description |
---|---|---|
System.Object | oldContent | The old value. |
System.Object | newContent | The new value. |
Overrides
| Improve this Doc View SourceRemoveItem(DataPointSeries, Object)
Removes an item from an items control.
Declaration
protected override void RemoveItem(DataPointSeries itemsControl, object data)
Parameters
Type | Name | Description |
---|---|---|
DataPointSeries | itemsControl | The items control. |
System.Object | data | The data to be removed. |