I am an absolute beginner to WPF applications and need some help. All I’m trying to do is draw a rectangle from point A to point B, and be able to detect when the rectangle is clicked. So when it is clicked it turns yellow and when clicked again, red.
Share
There are multiple ways to do this.
The first is easiest if you’re just starting with XAML (although #2 is recommended if you want to adhere to MVVM).
And the code-behind handler: