locked
Button click event in viewmodel of the window, if we place user control in window-MVVM based RRS feed

  • Question

  •  

    I am facing 1 technical challenge related with User control in WPF.

     User control is having 2 buttons.

     

    I am not getting button click event in viewmodel of the window, if we place user control in window (View) .

     

    Eg:

    User control name: UC1

    Window name(where user control is placed): Mainwindow

    View model for Mainwindow: MainwindowViewModel

    How can I fire button click event from UC1 to MainwindowViewModel.


     Help from any side is appreciated.

     

    Thanks

    Thursday, March 31, 2011 6:56 AM