I understand the MVVM pattern, tell me how to properly implement the connection between the Model and ViewModel collections. Suppose in Model I have a collection that is replenished by it (when clients connect)

public List<Client> ClientList { get; set; } 

How do I implement a similar collection in the ViewModel? (a binding from View is made on it)

  • You can create events in the model (for example, the Client has connected, the Client has disconnected) and subscribe to them in the VM. You can do the same thing but already with the collection itself (I showed an example here ), or you can make pulling out new data on a timer. - EvgeniyZ

0