If some resources are defined in an XML of another assembly and we want to use them in some XMLs in the current assembly, generally we declare it as follows, either using the full application syntax or the simple component one:
Either works just fine in the design time. The resources could be found from the other assembly and the current XML window pages look just fine.
However, when running the code in either debug or release mode, the WPF run time will complain that the other assembly could not be found. No matter where you put the other assembly, it just does not work most of times. Even if it works sometimes, some other times behavior would just become trickier. Using the dependant assembly resolving path event looks not only quite some work but also hard to address all scenarios properly.
Through a lot of trials and errors, it's found that the final solution is simple like this, creating a dummy XML window into the same other assembly and trying to load it before using any of those resources defined in the same assembly. It's based on the simple fact that loading a page, control or window from the same assembly would not cause any issue. Of course, the assembly should be referenced into the current assembly for the workaround to work. This will less likely be missing since the XML display in the design mode needs the other assembly to be properly referenced as well.
Hope this could save peoples' hours of effort and many trickier behavior in the regard.