Click here to Skip to main content
15,901,205 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
currently I am working on WPF and using lot of commands but have one question,
Do Commands exists in winform? and if yes then how to implement them in winform??

Thanks in advance

What I have tried:

I want to implement commands in winform but does not know how to implement it
Posted

There's a project on CodePlex where the author has done a custom implementation of commands in WinForms. It's only a side-project and only listed under "Downloads overview": WPF Application Framework (WAF)[^] (see "WAF Windows Forms Adapter 1.0.0.1" under "Experimental"). I checked it out a while ago and it worked fine.
 
Share this answer
 
Windows Forms has Events/EventHandlers, WPF has Commands. While you can kind-of say that WinForms Events/EventHandlers serve the same function as WPF Commands ... handling user interaction ... these two technology stacks have very different architectures. WPF implements "event bubbling:" WinForms does not, etc.

There are some attempts to make WinForms have some of the command pattern "goodness" that WPF does, but, imho, these in general are hacks. There are a lot of articles here on CodeProject that offer some kind of MVP framework for Win Forms.

This article may clarify some of the key differences for you: [^].
 
Share this answer
 
"Commands" don't exist in Windows Forms.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900