I'm trying to implement a property changed event (or which ever is appropriate) in my wpf project and I'm trying to find the best way to do this.
I have this header where it has an expand/collapse icon and in my window, I might have multiple headers. I want the default to be collapsed when all headers are listed in the beginning but when the user expands some of the headers (not all), when I click 'refresh' on my window to update the headers, I want it to stay the way it was before it was refreshed.
So, if the header 1 and 2 were expanded, and 3 and 4 were collapsed, when the refresh button is pressed, I want it to actually remember that. The problem is, when I click 'refresh' it refreshes the whole view so it loses the information.
I'm trying to have a collection in the actual class that hosts these headers to store the information so when a header is expanded or collapsed, it will notify the collection that a expanded/collapsed has fired and I want to update that value within the collection so when the refresh button is clicked, I can compare it with a GUID if the header was already present in the view before the refresh, update the new header coming in with the stored information of expand/collapse so even after the refresh, it will hold it's state.