Search code examples
wpfimagexamlviewbox

Low quality of shrinked images in a Viewbox


This is my resource:

enter image description here

This is how the Viewbox displays it:

enter image description here

This is how I want it:

enter image description here

Any way to achieve that?


Solution

  • You should change RenderOptions.BitmapScalingMode to HighQuality against an Image

    Use high quality bitmap scaling, which is slower than LowQuality mode, but produces higher quality output. The HighQuality mode is the same as the Fant mode.

    your XAML

    <Image Source="..." RenderOptions.BitmapScalingMode="HighQuality"/>