Upload file to XAP

I had several CSV files embedded in the Silverlight DLL (as a resource). I need to move them to XAP (as content, not a resource). The problem is that Application.GetResourceStream always returns null when trying to access files. I tried several ways to achieve this, but it seems I can not do this. How do you reference CSV files from code?

Thanks in advance.

+3
source share
1 answer

How to get files from resources in Silverlight 2.0

StreamResourceInfo sr = Application.GetResourceStream (new Uri ("MyImage.png", UriKind.Relative));

BitmapImage bmp = new BitmapImage ();

bmp.SetSource (sr.Stream);

+5
source

Source: https://habr.com/ru/post/1718692/


All Articles