I am creating a WPF application. It contains a window which is filled with a page. Within this page I have a treeview which acts as a menu for my application.
How would I be able to navigate to another page while keeping the treeview unchanged
eg. A users navigates to a page, when that page loads the treeview automatically resets, but I want the treeview to remain as the user left it(opened branches to the last menu item)
At the moment I have the following on each page:
This is why it resets
<TreeView>
<TreeViewItem Header="Items">
<TreeViewItem Header="Item 1"></TreeViewItem>
<TreeViewItem Header="Item 2"></TreeViewItem>
</TreeViewItem>
<TreeViewItem Header="ore Items">
<TreeViewItem Header="Item a"></TreeViewItem>
<TreeViewItem Header="Item b"></TreeViewItem>
</TreeViewItem>
</TreeView>
If the user clicks on Items>Item 1. When the next page loads I'd like the tree view to be opened as the user left it (Items>Item 1) and not reload to default.
Is this possible to do?