how to bind the click event of a button and the selecteditemchanged of a listbox to a viewmodel in m

Posted by Michel on Stack Overflow See other posts from Stack Overflow or by Michel
Published on 2010-04-09T10:05:16Z Indexed on 2010/04/09 15:23 UTC
Read the original article Hit count: 351

Hi,

i'm just starting with the mvvm model in Silverlight. In step 1 i got a listbox bound to my viewmodel, but now i want to propagate a click in a button and a selecteditemchanged of the listbox back to the viewmodel. I guess i have to bind the click event of the button and the selecteditemchanged of the listbox to 2 methods in my viewmodel somehow?

For the selecteditemchanged of the listbox i think there must also be a 'return call' possible when the viewmodel tries to set the selecteditem to another value?

i come from a asp.net (mvc) background, but can't figure out how to do it in silverlight.

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about silverlight-3.0