Programmatically set the Source of an Image (XAML)

后端 未结 7 685
孤街浪徒
孤街浪徒 2020-12-09 02:15

I am working on a Windows 8 app. I need to know how to programmatically set the Source of an Image. I assumed that the Silverlight approach would work. However, it doesn\'t.

7条回答
  •  -上瘾入骨i
    2020-12-09 03:15

    Well, Windows.Foundation.Uri is documented like this:

    .NET: This type appears as System.Uri.

    So the tricky bit isn't converting it into a Windows.Foundation.Uri yourself - it looks like WinRT does that for you. It looks like the problem is with the URI you're using. What is it relative to in this case? I suspect you really just need to find the right format for the URI.

提交回复
热议问题