2011-04-04 76 views

回答

7

這應該工作:

var uri = new Uri("/ReferencedAssembly;component/default.png", UriKind.Relative); 
var streamInfo = System.Windows.Application.GetResourceStream(uri); 
var stream = streamInfo.Stream;