Im developing a small file explorer, how do i set Back button.
i have:
txtAddress.Text which is the address bar of the explorer.
string currAddress which has the current address.
List<string> prevAddress which should hold some previous addresses which had been visited for Back Button
and i use:
Root(); to get My Computer items.
Open(string Address); to get Files/Folder from an address.
Search(string Address, string keyword); to get the search result items.
i need the back button because when i do search in a path, i can’t press up button (which go to the parent path) because i need to get back to the path i was searching in, so how do back button works in explorer? and when should i add/remove addresses from it?

To implement a back button well I would suggest using a stack of some kind which maintains the locations which the user has been. Each time a navigation is performed,
pushthe old location onto the stack. When the back button is pressed,popthe top item on the stack and navigate to that location. If the stack is empty, make the back button unusable, as there is nowhere to go back to.