Solved Exception in Passing Relative URI to Windows Runtime

While working today on a Windows Store Application I had a requirement to work with URI. Business class was as follows,

 

image

And I created instance of Product class in usual way setting values for both properties. I had put all images in ProductImages folder.

 

image

 

On running application I got following exception that given System.Uri cannot be converted.

image

 

After small research I found that WinRT does not support Relative URI. It only supports Absolute URI.

 

image

 

Now I fixed above problem by converting Relative URI to Absolute URI.

 

image

 

Exception got fixed after changing URI as absolute URI. I hope you find this quick fix useful. Thanks for reading.

4 responses to “Solved Exception in Passing Relative URI to Windows Runtime”

  1. […] to work with Images in RadDataGrid in XAML based Windows Store Application and Solved Exception in Passing Relative URI to Windows Runtime (Dhananjay […]

  2. […] Solved Exception in Passing Relative URI to Windows Runtime (Dhananjay Kumar) […]

  3. Thank You..!!!

    Very helpful.

Leave a comment

Create a website or blog at WordPress.com