Josh Smith's MVVM Demo App: Add commands to MainWindowViewModel's command list
Posted
by MAD9
on Stack Overflow
See other posts from Stack Overflow
or by MAD9
Published on 2009-08-24T11:23:40Z
Indexed on
2010/06/14
8:02 UTC
Read the original article
Hit count: 882
I have a question concerning Josh Smith's famous demo app on MVVM.
I try building a "real" application around it to learn WPF.
He creates this CommandsList in the MainWindowViewModel containing 2 Commands (create new and view all customers). This list is readonly (why? any particular reason?). I thougt it would be nice to add and remove some commands, depending on the workspace that is currently selected. Like edit or delete a customer when it has the focus and so on.
How would I accomplish this?! Can I just make it a normal list and add commands? Or bind the Commands-View to a commands list of the selected workspace instead of the MainWindow? How? Any other ways? Please share your ideas!
Thank you very much!
© Stack Overflow or respective owner