I just thought I already know how WPF and XAML Syntax works.... wrooong.

I got the message:

'WithEvents' variables can only be typed as classes, interfaces or type parameters with class constraints.

Please, do you know why this syntax is wrong?

I need to use the single value as double. It works later with an storyboard in codebehind.

Regards Error Screenshot

I just want to animate the Red rectangle with a storyboard in location and size. Perhaps XAML is the right solution anyway? Red rectangle

Edit
Report