To reproduce : add a RadTreeView with several nodes and use the following code snippet:
this.radTreeView1.AllowDragDrop = true;
this.TopMost = true;
Note that dragging a node will no longer display the "DropHint" line.
Workaround:
class CustomDragDropService : TreeViewDragDropService
{
public CustomDragDropService(RadTreeViewElement owner) : base(owner)
{
}
protected override void UpdateHintPosition(Point mousePosition)
{
FieldInfo fi = typeof(TreeViewDragDropService).GetField("dropHintWindow",
BindingFlags.NonPublic | BindingFlags.Instance);
RadLayeredWindow window = fi.GetValue(this) as RadLayeredWindow;
window.TopMost = true;
base.UpdateHintPosition(mousePosition);
}
}
class CustomTreeViewElement : RadTreeViewElement
{
//Enable themeing for the element
protected override Type ThemeEffectiveType
{
get
{
return typeof(RadTreeViewElement);
}
}
//Replace the default drag drop service with the custom one
protected override TreeViewDragDropService CreateDragDropService()
{
return new CustomDragDropService(this);
}
}
class CustomTreeView : RadTreeView
{
//Replace the default element with the custom one
protected override RadTreeViewElement CreateTreeViewElement()
{
return new CustomTreeViewElement();
}
//Enable theming for the control
public override string ThemeClassName
{
get
{
return typeof(RadTreeView).FullName;
}
}
}