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.
Hi,
The target type of your style points to ContentControl. If your drop taget is not ContentControl that may cause the error.
Regards.Plamen.
The DropTarget derives from ContentControl. Is that ok? Also, this happens before Dropping, if that matters.
Thanks,
Joe