As shown in the question you link to, you’d need to call BeginInit and EndInit, like so as well as set the UriSource property:
Dim bmi As New BitmapImage()
bmi.BeginInit()
bmi.CacheOption = BitmapCacheOption.OnLoad
bmi.UriSource = New Uri(fiInfo.FullName, UriKind.Absolute)
bmi.EndInit()
More Related Contents:
- “Items collection must be empty before using ItemsSource.”
- How do I use WPF bindings with RelativeSource?
- ControlTemplate for existing controls in WPF
- Databinding an enum property to a ComboBox in WPF
- How to loop through all the properties of a class?
- Case insensitive string compare in LINQ-to-SQL
- How can I add a hint text to WPF textbox?
- How do I set a ViewModel on a window in XAML using DataContext property?
- Change WPF DataTemplate for ListBox item if selected
- Update primary key value using entity framework
- Can I set Option Explicit and Option Strict on a Project/Solution level?
- Controlling Application’s Volume: By Process-ID
- Is it necessary to add a @ in front of an SqlParameter name?
- Accessing imgUr thru OAuth (uploading to user account)
- How can I convert ‘System.Windows.Input.Key’ to ‘System.Windows.Forms.Keys’?
- Making sure OnPropertyChanged() is called on UI thread in MVVM WPF app
- How do I validate email address formatting with the .NET Framework?
- RestSharp serialization to JSON, object is not using SerializeAs attribute as expected
- How can I get a ListView GridViewColumn to fill the remaining space in my grid?
- “The calling thread must be STA, because many UI components require this” error when creating a WPF pop-up Window in thread
- Coerce a WPF TextBox not working anymore in .NET 4.0
- Dragging an image in WPF
- Assigning a value to ComboBox Items
- How does ItemContainerGenerator.ContainerFromItem work with a grouped list?
- How to prevent a new WPF form from stealing focus?
- How to implement Balloon message in a WPF application
- How do I bind a Byte array to an Image in WPF with a value converter?
- .NET — Textbox control – wait till user is done typing
- How to post a file via HTTP post in vb.net
- How to securely store a connection string in a WinForms application?