You’re probably looking for Application.GetResourceStream
StreamResourceInfo sri = Application.GetResourceStream(new Uri("Images/foo.png"));
if (sri != null)
{
using (Stream s = sri.Stream)
{
// Do something with the stream...
}
}
More Related Contents:
- Storing WPF Image Resources
- How to refer to Embedded Resources from XAML?
- AddStock' is a 'type' but is used like a 'variable'
- .NET bug. How to fix?
- How to calculate WPF TextBlock width for its known font size and characters?
- WPF: How to dynamically Add Controls in dynamically created WPF Window
- How can I extract a file from an embedded resource and save it to disk?
- .NET Memory issues loading ~40 images, memory not reclaimed, potentially due to LOH fragmentation
- How do I exit a WPF application programmatically?
- Datagrid binding in WPF
- Updating an ObservableCollection in a separate thread
- Convert WPF (XAML) Control to XPS Document
- BitmapImage to byte[]
- Print FixedDocument/XPS to PDF without showing file save dialog
- How do you disable Aero Snap in an application?
- WPF DataBinding not updating?
- How can I simulate a mouse click at a certain position on the screen?
- WPF UI multitasking
- Convert System.Windows.Media.ImageSource to System.Drawing.Bitmap
- How can I get the Position of textbox that has been pressed?
- Interaction Triggers in Style in ResourceDictionary WPF
- WPF TwoWay Binding to a static class Property
- Reportviewer tool missing in visual studio 2017 RC
- Prism assembly reference failure: System.Windows.Interactivity
- wpf datagrid combobox column
- C#/WPF: Disable Text-Wrap of RichTextBox
- How to draw arc with radius and start and stop angle
- How to Print Preview when using a DocumentPaginator to print?
- TreeView, HierarchicalDataTemplate and recursive Data
- WPF + MVVM + RadioButton : How to handle binding with single property?