The given System.Uri cannot be converted into a Windows.Foundation.Uri

后端 未结 7 2026
隐瞒了意图╮
隐瞒了意图╮ 2020-12-01 10:47

I\'m trying to programmatically load a BitmapImage in a XAML Metro app. Here\'s my code:

var uri = new Uri(\"/Images/800x600/BackgroundTile.bmp\", UriKind.Re         


        
7条回答
  •  自闭症患者
    2020-12-01 11:04

    In case you're still having issues or are being asked to find an app to open the link, are you trying to use a WebView? If so, try using ms-appx-web instead of ms-appx.

    An example:

    this.webBrowser.Navigate(new Uri("ms-appx-web:///level/level/level/index.html"));
    

    Also note the lack of the URIKind parameter--evidently not needed at all in these instances.

    (I believe you may need to vary the leading forward slashes depending on your reference)

提交回复
热议问题