I am trying to load an icon that is in my project directly in the main directory. In order to do that i do this:
Dim uriSrc As Uri = New Uri("pack://ELE100WalkerWPF:,,,/assemblyName;Component/ShowMCF.png")
Dim bitmapImage As BitmapImage = New BitmapImage With {.UriSource = uriSrc}
Dim image As System.Windows.Controls.Image = New System.Windows.Controls.Image() With {.Source = bitmapImage}
This simply doesn't work even if for my styles i reference them in the same way:
<ResourceDictionary Source="pack://application:,,,/ELE100WalkerWPF;component/Resources/Colors.xaml" />
The only difference is that my styles are defined in the MergeDictionary in the application.xaml like this
<ResourceDictionary Source="Resources/Colors.xaml" />
Can somebody please explain why the image is not showing and how i can solve this? Thanks in advance