Hi Telerik,
we are creating a RadWindow using below code and we got a RadSchedulerView inside the usercontrol which is the content of the RadWindow and This is common method in our application.
var radWindow = new RadWindow
{
VerticalContentAlignment = VerticalAlignment.Stretch,
HorizontalContentAlignment = HorizontalAlignment.Center,
Header = menuCaption,
Tag = windowId,
Content = content,
Width = width,
Height = height,
IsRestricted = true,
WindowStartupLocation =
Telerik.Windows.Controls.WindowStartupLocation.CenterScreen,
RestrictedAreaMargin =
new Thickness(RestrictedAreaLeft, RestrictedAreaTop,
RestrictedAreaRight, RestrictedAreaBottom)
};
Adding the DragDrop behavior to the control.
RadDragAndDropManager.SetAllowDrag((UserControl)content, true);
RadDragAndDropManager.AddDragQueryHandler((UserControl)content, OnDragQuery);
RadDragAndDropManager.AddDragInfoHandler((UserControl)content, OnDragInfo);
On the RadSchesuler when I start drag,CanStartDrag event fires and CanDrop event never fires.
I think one of the above methods are overriding the CanDrop method on CustomDragDropBehavior class.
Any suggestions to make DragDrop work for RadSchedulerView inside RadWindow.
public class CustomDragDropBehavior : Telerik.Windows.Controls.ScheduleViewDragDropBehavior
{
public override bool CanDrop(DragDropState state)
{
return true;
}
public override bool CanStartDrag(DragDropState state)
{
return true;
}
public override void Drop(DragDropState state)
{
base.Drop(state);
}
}
Thanks,
Kotte.