如果是resource
imgPuzzlePic.Source = new BitmapImage(new Uri("AD/AD.png", UriKind.Relative));
如果是content
imgPuzzlePic.Source = new BitmapImage(new Uri("/AD/AD.png", UriKind.Relative));
差别就是一个/
如果是resource
imgPuzzlePic.Source = new BitmapImage(new Uri("AD/AD.png", UriKind.Relative));
如果是content
imgPuzzlePic.Source = new BitmapImage(new Uri("/AD/AD.png", UriKind.Relative));
差别就是一个/
转载于:https://www.cnblogs.com/cuihongyu3503319/archive/2012/05/22/2513062.html