Is there a way to specify how an image is scaled up in an Image
element with LayoutTransform
set to a ScaleTransform
with integer values for ScaleX
and ScaleY
?
I want to display the scaled image crisply (ie using 'nearest neighbour' scaling), with no blurring. (Imagine how you would want a bitmap editing program to behave when zooming in).
I noticed the protected property VisualBitmapScalingMode
on Image
, so created a subclass of Image
that sets this property to BitmapScalingMode.NearestNeighbor
. However, this had no effect.