This question is locked. New answers and comments are not allowed.
I'd like to hide the drag visual. (See attached image.) How do I do this?
I've tried this:
I also tried using a Setter for Visibility with a value of Collapsed, instead of setting the Template property.
In both cases, I'm getting a KeyNotFoundException inside a XamlParseException. If I comment out the DragVisualStyle, then I don't get the error.
XamlParseException: [Line: 0 Position: 0]
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.SetValue(IManagedPeerBase obj, DependencyProperty property, DependencyObject doh)
at System.Windows.DependencyObject.SetValue(DependencyProperty property, DependencyObject doh)
at System.Windows.FrameworkElement.set_Style(Style value)
at Telerik.Windows.Controls.DragDropHelper.CreateDefaultDragVisual(IEnumerable`1 draggedAppointments)
at Telerik.Windows.Controls.DragDropHelper.CreateDragVisualFullTrust(IPayload payload, Double& offsetLeft, Double& offsetTop)
at Telerik.Windows.Controls.DragDropHelper.CreateDragVisual(IPayload payload, Double& offsetLeft, Double& offsetTop)
at Telerik.Windows.Controls.DragDropHelper.OnDragInitialize(Object sender, DragInitializeEventArgs e)
at Telerik.Windows.DragDrop.DragInitializeEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at Telerik.Windows.RadRoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at Telerik.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RadRoutedEventArgs routedEventArgs)
at Telerik.Windows.RouteItem.InvokeHandler(RadRoutedEventArgs routedEventArgs)
at Telerik.Windows.EventRoute.InvokeHandlersImpl(Object source, RadRoutedEventArgs args, Boolean raisedAgain)
at Telerik.Windows.EventRoute.InvokeHandlers(Object source, RadRoutedEventArgs args)
at Telerik.Windows.RadRoutedEventHelper.RaiseEvent(DependencyObject element, RadRoutedEventArgs args)
at Telerik.Windows.DependencyObjectExtensions.RaiseEvent(DependencyObject element, RadRoutedEventArgs e)
at Telerik.Windows.DragDrop.DragInitializer.StartDrag()
at Telerik.Windows.DragDrop.DragInitializer.StartDragPrivate(UIElement sender)
at Telerik.Windows.DragDrop.DragInitializer.DragSourcePreviewMouseMove(Object sender, MouseEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)
Inner exception: KeyNotFoundException
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at System.Windows.ResourceManagerWrapper.GetResourceForUri(Uri xamlUri, Type componentType)
I've tried this:
<
telerik:RadScheduleView
>
<
telerik:RadScheduleView.ViewDefinitions
>
<!-- ... -->
</
telerik:RadScheduleView.ViewDefinitions
>
<
telerik:RadScheduleView.DragVisualStyle
>
<
Style
TargetType
=
"telerik:DragVisual"
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"telerik:DragVisual"
>
<
Grid
/>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
</
telerik:RadScheduleView.DragVisualStyle
>
</
telerik:RadScheduleView
>
I also tried using a Setter for Visibility with a value of Collapsed, instead of setting the Template property.
In both cases, I'm getting a KeyNotFoundException inside a XamlParseException. If I comment out the DragVisualStyle, then I don't get the error.
XamlParseException: [Line: 0 Position: 0]
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.SetValue(IManagedPeerBase obj, DependencyProperty property, DependencyObject doh)
at System.Windows.DependencyObject.SetValue(DependencyProperty property, DependencyObject doh)
at System.Windows.FrameworkElement.set_Style(Style value)
at Telerik.Windows.Controls.DragDropHelper.CreateDefaultDragVisual(IEnumerable`1 draggedAppointments)
at Telerik.Windows.Controls.DragDropHelper.CreateDragVisualFullTrust(IPayload payload, Double& offsetLeft, Double& offsetTop)
at Telerik.Windows.Controls.DragDropHelper.CreateDragVisual(IPayload payload, Double& offsetLeft, Double& offsetTop)
at Telerik.Windows.Controls.DragDropHelper.OnDragInitialize(Object sender, DragInitializeEventArgs e)
at Telerik.Windows.DragDrop.DragInitializeEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at Telerik.Windows.RadRoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at Telerik.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RadRoutedEventArgs routedEventArgs)
at Telerik.Windows.RouteItem.InvokeHandler(RadRoutedEventArgs routedEventArgs)
at Telerik.Windows.EventRoute.InvokeHandlersImpl(Object source, RadRoutedEventArgs args, Boolean raisedAgain)
at Telerik.Windows.EventRoute.InvokeHandlers(Object source, RadRoutedEventArgs args)
at Telerik.Windows.RadRoutedEventHelper.RaiseEvent(DependencyObject element, RadRoutedEventArgs args)
at Telerik.Windows.DependencyObjectExtensions.RaiseEvent(DependencyObject element, RadRoutedEventArgs e)
at Telerik.Windows.DragDrop.DragInitializer.StartDrag()
at Telerik.Windows.DragDrop.DragInitializer.StartDragPrivate(UIElement sender)
at Telerik.Windows.DragDrop.DragInitializer.DragSourcePreviewMouseMove(Object sender, MouseEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)
Inner exception: KeyNotFoundException
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at System.Windows.ResourceManagerWrapper.GetResourceForUri(Uri xamlUri, Type componentType)