Hi, I'm using MVP in WPF and I came across a design doubt and I would to get your opinion on this:
At some point I need to refresh my view and perform the same initial queries, like when the view was loading. The view's DataContext is my presenter and I have a couple of collections and other variables that are bound to the view. When I need to refresh the view, I'm clearing the collections and the variables and setting the DataContext to null. After that I fetch new data, populate the collections and set the DataContext. Is this the best way to achieve this?
The issue with this, is that i'm affraid that when my app grows bigger I forget to reset some variable...the ideal would be to reload the view again in some way without having to worry with the variables I have.
Best regards.