Completed
Last Updated: 01 Jun 2018 15:12 by Dimitar
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 18 May 2018 06:11
Category: TreeView
Type: Bug Report
0
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. 

Workaround: 

    Class CustomDragDropService
        Inherits TreeViewDragDropService

        Public Sub New(ByVal owner As RadTreeViewElement)
            MyBase.New(owner)
        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
            Get
                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
            Get
                Return GetType(RadTreeView).FullName
            End Get
            Set(value As String)
                MyBase.ThemeClassName = value
            End Set
        End Property
    End Class
Attached Files:
0 comments