There is a task to perform something by clicking the mouse on this element. The element must not be a Button. Which element is best to use and which event will be appropriate in this case?
2 answers
An element can be any, the easiest way to use any descendant ContentControl
, for example Label
. As an event, you can use, for example, MouseLeftButtonUp
or MouseLeftButtonDown
.
|
Direct drawing with the mouse is conveniently done using the InkCanvas element. In this case, this element alone will be enough for simple drawing:
<InkCanvas height="100" width="100" />
- You misunderstood me) I meant not to draw with a mouse on the control, but from the code immediately some ready-made figure) - Yaroslav Schubert
|