I am trying to create a control that allows capture of a still image from a streaming network cam. My idea is to stream the camera into a rectangle control, which I have functioning. I need to provide ability for user to specify area of the stream they want to capture. For this I have created a very simple UserControl with a grid having 2xcolumns and rows and setting ShowGridLines to true.
I show this in the same grid column/row as my streaming Rectangle and can see my “crosshairs” in the centre of my stream. I now need to position the centre of my UserControl to the mouse cursor co-ordinates.
Can anyone help as I’m struggling?
Add EventTrigger for
MouseLeftButtonUpand within it usePoint position = e.GetPosition(null);. After this manipulation you’ll have mouse position and can do whatever you need withUserControl.