I'm getting a runtime exception at the instant I grab a DragSource item with the mouse and start to move it.
I only get this when I've set the following on my DropTargets:
dropTarget.DropTargetStyle = (Style)this.Resources["HoverOverStyle"];
My Style Resource is set as follows:
<UserControl.Resources> <Style x:Key="HoverOverStyle" TargetType="ContentControl"> <Setter Property="Background" Value="Yellow"/> </Style></UserControl.Resources>
The Exception is: System.Windows.Markup.XamlParseException:
Please see the attached file, DropTargetStyle.zip, for detail about the exception.
The DropTarget derives from ContentControl. Is that ok? Also, this happens before Dropping, if that matters.
Thanks,
Joe
Hi,
The target type of your style points to ContentControl. If your drop taget is not ContentControl that may cause the error.
Regards.Plamen.
I've tried to reproduce the issue based on your description but with no success.
Could you provide a simplified sample that reproduces the issue?
Thank you