Results 1 to 6 of 6
- 11-20-2012, 12:54 AM
#1
Hi
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
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.Code:System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("123.png")
Hope you figure it out!
Similar Threads
-
When do you expect to get your Nokia?
By jwckauman in forum Nokia Lumia 920Replies: 13Last Post: 11-09-2012, 11:59 AM -
Glitch? Wi-Fi immedietly fails when attempting to connect to an open network [help]
By seaniccus in forum Samsung FocusReplies: 8Last Post: 08-31-2011, 06:35 AM -
I keep getting a error when I try to update to the march update
By silentmano in forum Samsung FocusReplies: 1Last Post: 07-27-2011, 07:29 AM -
Busy Signal when attempting to call
By jesdt in forum Samsung Omnia 7Replies: 0Last Post: 07-19-2011, 06:00 PM
LinkBack URL
About LinkBacks






























Latest Comments