Last Updated: 01 Jun 2018 15:12 by Dimitar
Dess | Tech Support Engineer, Principal
Created on: 18 May 2018 06:11
Category: TreeView
Type: Bug Report
FIX. RadTreeView - auto-scroll is not working while dragging a node
To reproduce: add several nodes at design time in order to obtain a vertical scrollbar. Enable the drag and drop functionality by setting the AllowDragDrop property to true. If you start dragging you will notice that the RadTreeView doesn't auto-scroll  when you drag close to the borders of the visible area. 


    Class CustomDragDropService
        Inherits TreeViewDragDropService

        Public Sub New(ByVal owner As RadTreeViewElement)
        End Sub

        Protected Overrides Sub SetHintWindowPosition(ByVal mousePt As Point)
        End Sub
    End Class

    Class CustomTreeViewElement
        Inherits RadTreeViewElement

        Protected Overrides ReadOnly Property ThemeEffectiveType As Type
                Return GetType(RadTreeViewElement)
            End Get
        End Property

        Protected Overrides Function CreateDragDropService() As TreeViewDragDropService
            Return New CustomDragDropService(Me)
        End Function
    End Class

    Class CustomTreeView
        Inherits RadTreeView

        Protected Overrides Function CreateTreeViewElement() As RadTreeViewElement
            Return New CustomTreeViewElement()
        End Function

        Public Overrides Property ThemeClassName As String
                Return GetType(RadTreeView).FullName
            End Get
            Set(value As String)
                MyBase.ThemeClassName = value
            End Set
        End Property
    End Class
Attached Files: