I have a button that's display an image :
<Button Command="{Binding Model.ZoomOnImage}">
<Image Source="{Binding Model.ImageSource}" Stretch="Uniform" />
</Button>
In my Model class, I have this command :
private ICommand _zoomOnImage;
public ICommand ZoomOnImage
{
get
{
if (_zoomOnImage == null)
_zoomOnImage = new RelayCommand(Zoom, CanZoom);
return _zoomOnImage;
}
}
private void Zoom() {...}
private bool CanZoom() {...}
When user click on the button, I want to get the click [X; Y] coordinates (to perform Zoom(int X, int Y)
). How can I modify my code to achieve this ?