Returns the location where this item is used.
Class: ItemClass
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET
public UsageLocationEnum UsageLocation { get; }
Public ReadOnly Property UsageLocation As UsageLocationEnumReturns the location where this item is used.
private void sftTree1_DragDetected(object sender, DragDetectedEventArgs e) {
Debug.Write("sftTree1_DragDetected ");
DumpValues(e);
// get the current item
if (e.Item == null) return;
ItemClass item = e.Item;
// don't drag headers, footers
if (item.UsageLocation != UsageLocationEnum.items)
return;
// start dragging the item
sftTree1.DoDragDrop(e.Item, DragDropEffects.Copy|DragDropEffects.Move);
}
private void sftTree1_DragOver(object sender, DragEventArgs e) {
Debug.WriteLine("sftTree1_DragOver ");
e.Effect = DragDropEffects.None;Private Sub sftTree1_DragDetected(ByVal sender As System.Object, ByVal e As Softelvdm.SftTreeNET.DragDetectedEventArgs) Handles SftTree1.DragDetected Debug.Write("sftTree1_DragDetected ") DumpValues(e) ' get the current item If e.Item Is Nothing Then Return Dim item As ItemClass = e.Item ' don't drag headers, footers If item.UsageLocation <> UsageLocationEnum.items Then Return ' start dragging the item SftTree1.DoDragDrop(e.Item, DragDropEffects.Copy Or DragDropEffects.Move) End Sub Private Sub sftTree1_DragOver(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles SftTree1.DragOver Debug.WriteLine("sftTree1_DragOver ") e.Effect = DragDropEffects.None If Not SftTree1.DropTarget Is Nothing And e.Data.GetDataPresent(GetType(ItemClass)) Then
See Also ItemClass Class | Classes | SftTree/NET 3.0