title: Can't properly load a ResourceDictionary at runtime
body: <p><strong>Note</strong>: I have a ResourceDictionary and WPF Window (my View) and ViewModel, all declared within a <strong>WinForms</strong> application. Therefore I have no App.xaml.</p>
  
  <p>I have the following converter declared:</p>
  
  <pre><code>Public Class DebugConverter
      Implements IValueConverter
  
      Public Function Convert(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.Convert
          Return value
      End Function
  
      Public Function ConvertBack(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.ConvertBack
          Return value
      End Function
  End Class
  </code></pre>
  
  <p>And then I try loading a ResourceDictionary at runtime (which I specified the build action as Resource and not Page):</p>
  
  <pre><code> m_rdGridDictionary = New ResourceDictionary()
   m_rdGridDictionary.Source = New Uri("pack://application:,,,/WPF/Helpers/GridResourceDictionary.xaml")
  </code></pre>
  
  <p>In the ResourceDictionary I have it declared as such:</p>
  
  <pre><code>&lt;ResourceDictionary
       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
       xmlns:cnv="clr-namespace:Positron.Cad.WindowGUI.WPFConverters"&gt;
  
       &lt;cnv:DebugConverter x:Key="DebugConverter"/&gt;
  &lt;/ResourceDictionary&gt;
  </code></pre>
  
  <p>But when I try loading the ResourceDictionary, it cannot find the converter:</p>
  
  <p><img src="https://i.stack.imgur.com/onmHc.png" alt="Error"></p>
  
  <p>Would anyone know what is wrong with this scenario? They both exist in the same namespaces, so that shouldn't be the problem.</p>