Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1540
Error when trying to use DropTargetStyle
posted

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.

 

 

 

 

DropTargetStyle.zip
Parents
No Data
Reply Children