2

i got some trouble...

My application is component-based. So i have an assembly which is the startup (WPF application project) and some other assemblies (libraries) for GUI and Rendering and so on.

Now i must open the Main Window in the startup-assembly. This window is located in the GUI library. Using some abstract classes I can access the GUI assembly and get the window. Now if i open the window using "Show()", i get only a window with black background. No controls are visible.

I created a new project. There the window works quite fine.

I just found this: WPF: How to start from a window in a different assembly and it works. But i wanted to do this manually on startup, cause i first have to initialize my core system.

Apropos, the window is black too in this way.

What´s the problem and how can i solve it?

Thanks :)

Community
  • 1
  • 1
SharpShade
  • 1,761
  • 2
  • 32
  • 45
  • 1
    Just tested this out via reflection and it works fine: Assembly.LoadFrom(..) then assembly.GetType(..) then Activator.CreateInstance() and finally .Show() --> window is displayed correctly. Are you sure that you are not missing additional stuff that the window needs to show properly, e.g. ResourceDictionarys, CodeBehind Stuff? Have you tried a simple clean window without any additional resources and namespace references? Do you have all necessary WPF references in your calling assembly? – SvenG Jun 12 '12 at 16:53
  • Ah i got it ... the problem was, that i only was able to create a user component using the assistant. whyever. there were some wrong namespaces in the XAML code. i copied one from an clear project and now the window is displayed correctly :) – SharpShade Jun 12 '12 at 18:05

0 Answers0