Class DragDropController
It contains the drag and drop related operations.
Inheritance
Implements
Namespace: Syncfusion.ListView.XForms
Assembly: Syncfusion.SfListView.XForms.dll
Syntax
public class DragDropController : Object, IDisposable
Constructors
DragDropController()
Initializes a new instance of the DragDropController class.
Declaration
public DragDropController()
DragDropController(SfListView)
Initializes a new instance of the DragDropController class.
Declaration
public DragDropController(SfListView listView)
Parameters
Type | Name | Description |
---|---|---|
SfListView | listView | Denotes the instance of SfListView. |
Properties
UpdateSource
Gets or sets a value indicating whether to update the underlying items when drag and drop is performed.
Declaration
public bool UpdateSource { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
CanAdjustDragItemAxis()
Decides to adjust the X position of the drag item for vertical Orientation and Y position for horizontal Orientation.
Declaration
protected virtual bool CanAdjustDragItemAxis()
Returns
Type | Description |
---|---|
System.Boolean | Return true, adjust X position of drag item else adjust only Y co-ordinates for vertical Orientation. For horizontal orientation, consider vice versa. |
Dispose()
Disposes the allocated objects.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes the instances, if the parameter is set to true.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | If true, dispose all the allocated objects. |
OnLayoutItem(View, Rectangle)
Helper method to layout every item while dragging.
Declaration
protected virtual Task<bool> OnLayoutItem(View element, Rectangle rect)
Parameters
Type | Name | Description |
---|---|---|
Xamarin.Forms.View | element | Indicates the ListViewItem for layout. |
Xamarin.Forms.Rectangle | rect | Indicates the rectangle value for layout. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | Return true if layout is completed or else return false. |