ProcessService

The IProcessService allows a developer to run processes from inside a view model.

Starting a process with arguments

To start a process with arguments, use the following code:

var dependencyResolver = this.GetDependencyResolver();
var processService = dependencyResolver.Resolve<IProcessService>();
processService.StartProcess("notepad.exe", @"C:\mytextfile.txt");

Starting a process with arguments and completed callback

To start a process with arguments and receive a callback on completion, use the following code:

var dependencyResolver = this.GetDependencyResolver();
var processService = dependencyResolver.Resolve<IProcessService>();
processService.StartProcess("notepad.exe", @"C:\mytextfile.txt", OnProcessCompleted);

Contributions

We would like to thank the following contributors:

Want to contribute to the documentation? We have a guide for that!


Questions

Have a question about Catel? Use StackOverflow with the Catel tag!