How to read a resource file within a Portable Class Library?

后端 未结 8 1741
夕颜
夕颜 2020-12-05 03:26

I have a Portable Library which I am using for a Windows Phone application. In that same Portable Library, I have a couple of content files (Build Action = Cont

8条回答
  •  情书的邮戳
    2020-12-05 03:37

    You need to use Application.GetResourceStream method instead of using GetManifestResource stream

    Reference: http://msdn.microsoft.com/en-us/library/ms596994%28v=vs.95%29.aspx

    var albumArtPlaceholder =  
        Application.GetResourceStream( 
            new Uri("Images/artwork.placeholder.png", UriKind.Relative)); 
    

提交回复
热议问题