Refresh combobox list from other window, MVVM

前端 未结 6 1911
长情又很酷
长情又很酷 2021-01-21 10:53

I\'m working on some application and I have one problem. I have two windows (Bookings - parent and Guests - child). In the parent window, I have one combo box with list of guest

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-21 11:07

    A simple callback interface can help you. The client should subscribe and if server pushes a notification then either populate the combobox or refresh.

    Here is a tutorial: http://idunno.org/archive/2008/05/29/wcf-callbacks-a-beginners-guide.aspx

    I used to created a "login" method and store every client callback on server side. Then whenever I needed to use push notification I simply used this stored client-callback. On the client side the you can handle the recieved message / event as you want.

提交回复
热议问题