Wednesday, June 9, 2010

XBAP – content files


Test the difference between these and explain was the different “Build Action”’s do to these types of loading

// In project itself = "same directory on the server as my .xbap file"  
Uri uri = new Uri("pack://siteoforigin:,,,/StorageSCP.ass.xml");
// In project itself = compiled into main exe  
Uri uri2 = new Uri("pack://application:,,,/StorageSCP.ass.xml");
// In project itself = included as "loose content"  
Uri uri3 = new Uri("StorageSCP.ass.xml", UriKind.Relative);
StreamResourceInfo assXML = Application.GetRemoteStream(uri);
StreamResourceInfo assXML3 = Application.GetRemoteStream(uri3);
StreamResourceInfo assXML2 = Application.GetContentStream(uri2);


Also see what this does ?


No comments:

Post a Comment