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.

Presented on Windows 8 development for JavaScript developers

image

Download resources of the session from here

My next presentation. Find details and register here

For updated from Delhi User Group events join Facebook Group here

On 9th March I presented on Windows 8 development for JavaScript developers. This event was conducted by Delhi User Group. There was decent number of participants in the event. I presented on “Windows 8 Development for JavaScript developers “. I covered following topics in my sessions

  • How development for Win8 is different?
  • Different JavaScript based project templates.
  • Work with Services and Data Source
  • Working with List View
  • Working with Templates
  • Working with Grouping
  • Working with Semantic Zoom
  • Working with Share Contract

Download resources of the session from here

My next presentation. Find details and register here

For updated from Delhi User Group events join Facebook Group here

My next session is on 23rd March. You can find details and register for that session here . See you seen in next community event.