Im working on a battleships program and have been trying to find a way to detect if my mouse click is on the form or on the picturebox using c# wpf.
if (click on form)
{
do this
}
else
{
do this
}
Im working on a battleships program and have been trying to find a way to detect if my mouse click is on the form or on the picturebox using c# wpf.
if (click on form)
{
do this
}
else
{
do this
}
If you go to the properties of the picturebox you are using and select the events tab there should be an "mouseclick" event.