You can try the following:
string windowClass = "CreateWindow.MyWindow";
Type type = Assembly.GetExecutingAssembly().GetType(windowClass);
ObjectHandle handle = Activator.CreateInstance(null, windowClass);
MethodInfo method = type.GetMethod("Show");
method.Invoke(handle.Unwrap(), null);
The above code assumes that your window is called "CreateWindow.MyWindow" (with a namespace prefix) and that the type "CreateWindow.MyWindow" is in the current executable assembly.
user128300
source
share