tags:

views:

21

answers:

2

We would like to open a wpf app from a console app and pass objects which were initialized in the console app to the wpf app. Just wondering if this is possible. Thanks N

A: 

You could use the command line and pass serialized objects as arguments but this will only work 1 time, when you start the wpf app.

If you need to maintain an ongoing conversation between the two you will need to host a wcf service in the wpf app and talk to it that way.

IMO hosting a service in the WPF app is the best way to go.

Sky Sanders
Thanks Sky, could you give me references of any such articles.
np
Sure. But they are many and implementations vary wildly. If the apps are to be running on the same machine, the simplest way would be a namedPipe or net.tcp binding implementation. I might be able to knock something out real quick if you can confirm that you have control of the code for both apps and that they are both running on the same machine.
Sky Sanders
A: 

You can pass objects in the constructor of your wpf window just like any other class..

Ex: Window1 window = new window1(myObject);

Deepak N
Deepak,Could you respond to this please:http://stackoverflow.com/questions/2245568/figure-the-arguments-when-wpf-form-is-started-using-process-class
np