In my program, I need a way to click on the Image control, the program takes the X, Y position where it was clicked, and then creates a rectangle around this position. My problem is that I use MVVM, so all my code is in a separate file (ViewModel file, not a code file). An Image control does not have a Command property, and what is the best way to implement it?
There are several options:
, , . , , . ViewModel , , .
ViewModel ( ). "" .
@Reed. , . . . , , "". ViewModel .
" MVVM, , " Command "? - , , , , - Button.Controltemplate . , Command.