c# - Open a WPF app with parameters in an XML file -
i want open app (wpf based) file contains parameters written in xml format.
how can that?
thanks..
as lloyd said, in wpf instead of using arguments in project startup class in ie winforms extract commmand line args. can b done whenever in first window ie this:
public window1() { initializecomponent(); string[] param = environment.getcommandlineargs(); // parameter in second 1 since first contains executable path or string xmlpath = param[1]; // open , edit xmlpath // .... }
then can drag&drop xml want ontop of wpf executable or invoke on commandline:
yourexecutable.exe myxml.xml
Comments
Post a Comment