The solution I came up with in the end was fairly simple. I already had the original image width in pixels, so all I had to do was to compare that against MultiScaleImage.ActualWidth divided by MultiScaleImage.ViewportWidth before zooming.
e.g.
if(_msi.ActualWidth / _msi.ViewportWidth > OriginalImageWidth)
{
return;
}
_msi.ZoomAboutLogicalPoint(...
Note: I'm still pretty new to the MultiScaleImage so if there's a better way feel free to comment.
No comments:
Post a Comment