New Posts New Posts RSS Feed: WPF Parameters
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

WPF Parameters

 Post Reply Post Reply
Author
JChris View Drop Down
Newbie
Newbie
Avatar

Joined: 13-Mar-2012
Location: Kansas
Posts: 8
Post Options Post Options   Quote JChris Quote  Post ReplyReply Direct Link To This Post Topic: WPF Parameters
    Posted: 27-Jul-2012 at 1:15pm
Is there a way to start a Cocktail WPF application with command line parameters?  
Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post Posted: 27-Jul-2012 at 2:12pm
There most certainly is. Are you asking how you start the process with command line parameters or how to obtain the parameters in your code?
 
If it's the latter, the command line parameters are part of the StartupEventArgs passed to the Application.Startup event. Simply override OnStartup in your bootstrapper and grab the parameters from the event args.
 
 
Alternatively, you can get them by calling Environment.GetCommandLineArgs().
 


Edited by mgood - 27-Jul-2012 at 2:14pm
Back to Top
JChris View Drop Down
Newbie
Newbie
Avatar

Joined: 13-Mar-2012
Location: Kansas
Posts: 8
Post Options Post Options   Quote JChris Quote  Post ReplyReply Direct Link To This Post Posted: 27-Jul-2012 at 2:24pm
Thanks Marcel.  Works great!
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down