I have some bitmaps in a sub-folder of resource folder (say, Resource/Bitmap) and I want to load them into a bitmap[] at one time, that is,
BitmapSource[] bitmaps=
TheMethodIWantToImplement(
new Uri("pack://application:,,,/MyAssembly;component/Resources/Bitmap",
UriKind.Absolute));
But I found that Directory.GetFiles does not accept an Uri argument. So…What should I do? Thank you.
Thank you, @Teudimundo. I modified the snippet of that link as follows:
But I still want to use the resource stream directly (can be retrieved via
select entry.Valuein the LINQ expression above), which is an instance ofUnmanagedMemoryStream. I needMemoryStreamto construct my object but I found no elegant methods for conversion.