11-20-2012, 12:54 AM #1
- 8 Posts
I am getting Null Reference Exception when StreamResourceInfo attempts to get a ResourceStream in Windows phone 8 emulator. When i tried the same in Windows phone 7 emulator, the stream is getting correctly. But its not working on Windows phone 8 emulator. Please find the below code.
StreamResourceInfo streamInfo = App.GetResourceStream(new Uri("/Image;component/Images/123.png", UriKind.Relative));
Please help me out if any?
11-20-2012, 07:19 AM #2
- 23 Posts
I'm not a WP developer (yet), but I am a .NET developer...
I always try to avoid referring to resources by their URI, as you never know exactly what it's going to be called, nor does it tell you in a debugger if the URI doesn't exist.
I don't know if this will work in WP, but in .NET I'd normally use:
to get the actual stream.
Hope you figure it out!
- By jwckauman in forum Nokia Lumia 920Replies: 13Last Post: 11-09-2012, 11:59 AM
- By seaniccus in forum Samsung FocusReplies: 8Last Post: 08-31-2011, 06:35 AM
- By silentmano in forum Samsung FocusReplies: 1Last Post: 07-27-2011, 07:29 AM
- By jesdt in forum Samsung Omnia 7Replies: 0Last Post: 07-19-2011, 06:00 PM