I wrote a custom control in WPF XAML using Visual Studio 2015. I wrote a little test application for it and, once I got it working, copied it to another application. There I got errors in my XAML. In this code:
<Canvas.Triggers>
<EventTrigger RoutedEvent="MouseEnter" SourceName="imgCenter">
<BeginStoryboard Name="GlowAnimation">
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="cirHighlight"
Storyboard.TargetProperty="Opacity"
From="0"
To="1"
Duration="0:0:0.5" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
...
I get an error on MouseEnter
. It appears red and mousing over it displays the message:
EventTrigger.RoutedEvent
Cannot resolve symbol 'MouseEnter'
I have several triggers, and all of them give me the red text and error message on the RoutedEvent
.
That's strange, but even stranger is that it actually compiles and works: the triggers work and operate as expected. But it's really frustrating that they appear as errors in the editor. I'm new to animation in WPF and rely on the IDE to tell me if I'm doing something wrong. So for now, the IDE thinks I'm screwing up, but the framework executes it fine.
Any idea what's going on and how to resolve it?
EDIT
I forgot to mention that I'm using ReSharper. It appears this may be the source of the problem.
EDIT
ReSharper is definitely the problem. I loaded my solution into Visual Studio on a workstation that doesn't have ReSharper and, sure enough, no errors.