今天被几个Uri搞晕,记录在案,备忘:
1. ApplicationBarIconButton 的Icon Uri: 所引用的Image的Build Action属性必须是"Content"
The URI must point to a file in the application directory. When adding an image file to an project using Windows Phone Developer Tools, you must set the Build Action property to “Content”. Using the default value “Resource” will not allow the image to be accessed or displayed. - from msdn
且Uri开头须使用反斜杠:
2. WebBrower控件显示本地Html文件内容,使用如下代码:
其中本地文件help.txt的Build Action属性必须为"Content", 但是!但是!Uri开头不能使用反斜杠
A relative URI that identifies the resource file to be loaded. The URI is relative to the application package and does not need a leading forward slash
from msdn