WPF Button Binding
-
Good afternoon Wasn't sure if this should be in another section but couldn't find one for WPF so stuck it here. Here goes... I'm developing an application using MVVM. I need to save some info into a DB using the child_insert on my Model object. I have the button on my View and am wondering how I would bind this to my child_insert method, obviously you cannot bind a button to a method so would I need a command property on my VM and then bind to that? There is probably something quite simple I'm missing but I'm having a brain fart this afternoon and am at the stage of staring at my code with a blank expression. Thanks in advance.
-
Good afternoon Wasn't sure if this should be in another section but couldn't find one for WPF so stuck it here. Here goes... I'm developing an application using MVVM. I need to save some info into a DB using the child_insert on my Model object. I have the button on my View and am wondering how I would bind this to my child_insert method, obviously you cannot bind a button to a method so would I need a command property on my VM and then bind to that? There is probably something quite simple I'm missing but I'm having a brain fart this afternoon and am at the stage of staring at my code with a blank expression. Thanks in advance.
Shrimpersfan wrote:
couldn't find one for WPF
You mean you didn't see Silverlight / WPF :confused:
I know the language. I've read a book. - _Madmatt