XAML Image Quality (interpolation) in a Metro-Style App

笑着哭i 提交于 2019-12-01 06:35:10

I faced the same image quality problem in my WinRT application, and tried to use RenderOptions.BitmapScalingMode but it is not present (and System.Windows.Media namespace as well) in .NET for Windows Store. So I tried your first solution and fixed it so that works. You were one small step from success, only need to add

ras.Seek(0);

to allow reading the stream from the beginning.

I know it is a little bit late, but it may be a useful reference for someone else. There's no need for such handler: you only need to set the value of the RenderOptions.BitmapScalingMode attached property.

<Image Source="{Binding ImgSource}" ImageOpened="img_ImageOpened" RenderOptions.BitmapScalingMode="HighQuality" />
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!