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,
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
Hi Nikolay,
Note: I've attached the modified files. Tried to send the zipped project, but it exceeded your 200kb upload limit.
Thank you for your help. I modified the TestApp project (Forum4.zip) you sent me the other day. I added:
to file TestView.xaml.cs.
And I added this Style definition to TestView.xaml:
The modified project is attached. To see the error, grab an item from the listbox and move to the wrappanel (no need to drop).