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

前端 未结 2 1326
Happy的楠姐
Happy的楠姐 2021-01-13 08:24

Given the following Image object (it\'s in the DataTemplate of a ListView object):

  

        
2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-13 08:33

    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.

提交回复
热议问题