How to help move the image does not exceed the limit on screens

纵然是瞬间 提交于 2019-12-08 16:03:36

you can check for which resolution is there , according to set Image height and width.

var scalfactor = App.Current.Host.Content.ScaleFactor;
switch (scalfactor)
            {
                case 150:
//write code for 720p or other screen Resolution

                  
                    break;
                case 160:
//write code for Wxga screen Resolution
          
                    break;
                case 100:
//write code for Wvga screen Resolution
              break;
                default:
                    throw new InvalidOperationException("Unknown resolution type");
            }

Plz refer this link for more info http://msdn.microsoft.com/en-us/library/windows/apps/jj206974%28v=vs.105%29.aspx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!