Hello.
I have a simple wpf application based on the RadWindow which contains an UserControl. In the UserControl i have two controls: ListBox and RadScheduleView. i used very good example from Telerik WPF Demos "RadScheduleView Drag And Drop" section. It works good when everything placed into a Window (or RadWindow). But when i am using UserControl instead of window and i am trying to drag some item from the ListBox i get exception: "Value cannot be null. Parameter name: second"
Stack Trace:
at System.Linq.Enumerable.Union[TSource](IEnumerable`1 first, IEnumerable`1 second)
at Telerik.Windows.DragDrop.Behaviors.DragPayload.PartialTrustPayload.GetFormats(Boolean autoConvert) in c:\TB\117\WPF_Scrum\Current_HotFix\Sources\Development\Core\Controls\DragDropManager\Behaviors\Common\DragPayload.cs:line 107
at System.Windows.DataObject.FormatEnumerator..ctor(DataObject dataObject)
at System.Windows.DataObject.System.Runtime.InteropServices.ComTypes.IDataObject.EnumFormatEtc(DATADIR dwDirection)
Call Stack:
[External Code]
Telerik.Windows.Controls.dll!Telerik.Windows.DragDrop.Behaviors.DragPayload.PartialTrustPayload.GetFormats(bool autoConvert) Line 107 + 0x30 bytes C#
[External Code]
Telerik.Windows.Controls.dll!Telerik.Windows.DragDrop.DragDropManager.DoDragDrop(System.Windows.DependencyObject dragSource, object data, System.Windows.DragDropEffects allowedEffects, System.Windows.DragDropKeyStates initialKeyState, object dragVisual, System.Windows.Point relativeStartPoint, System.Windows.Point dragVisualOffset) Line 1012 + 0xe bytes C#
Telerik.Windows.Controls.dll!Telerik.Windows.DragDrop.DragInitializer.StartDrag() Line 181 C#
Telerik.Windows.Controls.dll!Telerik.Windows.DragDrop.DragInitializer.DragSourcePreviewMouseMove(object sender, System.Windows.Input.MouseEventArgs e) Line 157 C#
[External Code]
Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.Open(bool isModal) Line 35 + 0x19 bytes C#
Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.WindowBase.ShowWindow(bool isModal) Line 716 C#
Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.RadWindow.ShowDialog() Line 420 C#
> RadDragDrop.exe!RadDragDrop.MainWindow.MainWindow_Activated(object sender, System.EventArgs e) Line 35 + 0x1e bytes C#
[External Code]
Best Regards,
Stas.
I have a simple wpf application based on the RadWindow which contains an UserControl. In the UserControl i have two controls: ListBox and RadScheduleView. i used very good example from Telerik WPF Demos "RadScheduleView Drag And Drop" section. It works good when everything placed into a Window (or RadWindow). But when i am using UserControl instead of window and i am trying to drag some item from the ListBox i get exception: "Value cannot be null. Parameter name: second"
Stack Trace:
at System.Linq.Enumerable.Union[TSource](IEnumerable`1 first, IEnumerable`1 second)
at Telerik.Windows.DragDrop.Behaviors.DragPayload.PartialTrustPayload.GetFormats(Boolean autoConvert) in c:\TB\117\WPF_Scrum\Current_HotFix\Sources\Development\Core\Controls\DragDropManager\Behaviors\Common\DragPayload.cs:line 107
at System.Windows.DataObject.FormatEnumerator..ctor(DataObject dataObject)
at System.Windows.DataObject.System.Runtime.InteropServices.ComTypes.IDataObject.EnumFormatEtc(DATADIR dwDirection)
Call Stack:
[External Code]
Telerik.Windows.Controls.dll!Telerik.Windows.DragDrop.Behaviors.DragPayload.PartialTrustPayload.GetFormats(bool autoConvert) Line 107 + 0x30 bytes C#
[External Code]
Telerik.Windows.Controls.dll!Telerik.Windows.DragDrop.DragDropManager.DoDragDrop(System.Windows.DependencyObject dragSource, object data, System.Windows.DragDropEffects allowedEffects, System.Windows.DragDropKeyStates initialKeyState, object dragVisual, System.Windows.Point relativeStartPoint, System.Windows.Point dragVisualOffset) Line 1012 + 0xe bytes C#
Telerik.Windows.Controls.dll!Telerik.Windows.DragDrop.DragInitializer.StartDrag() Line 181 C#
Telerik.Windows.Controls.dll!Telerik.Windows.DragDrop.DragInitializer.DragSourcePreviewMouseMove(object sender, System.Windows.Input.MouseEventArgs e) Line 157 C#
[External Code]
Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.Open(bool isModal) Line 35 + 0x19 bytes C#
Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.WindowBase.ShowWindow(bool isModal) Line 716 C#
Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.RadWindow.ShowDialog() Line 420 C#
> RadDragDrop.exe!RadDragDrop.MainWindow.MainWindow_Activated(object sender, System.EventArgs e) Line 35 + 0x1e bytes C#
[External Code]
Best Regards,
Stas.