Hi, i am using your tabcontrol to make an application navigation system in WPF MVVM like Google Chrome (note: i am not making an internet browser).
So, what is have is a HomeView(UserControl) and 3 Views CustomersView, EmployeesView and ProductsView and 3 view model for each view like CustomerViewModel, EmployeesViewModel, and ProductsViewModel.
what i want is whenever the application launch i want tabcontrol to have one tab with content (HomeView) see in above fig, and when i click on Customers buton i want CustomerView to load in the same tabitem.
User can add new tab and when new tab is created HomeView shows in the newly created tab item, and now the user can can open EmployeesView by clicking Employees button.
Hi Fahad,
We have created a simple sample based on your requirement. Please refer to the attached sample for your reference.
Regards,
Gokul T
Hi Gokul, thank you for taking the time to answer my question.
The sample you provided was exactly what i needed, but with UserControls, i have modified the sample to work with usercontrols instead of just showing textblock.
But i have one more query related to the sample to ask if you would be so kind to answer.
Q: How would i know (i.e when clicking on the customer button) if a customer tab is already opened, I don't want user to open multiple customer tabs, and if the (i.e when clicking on the customer button) customer tab is already opened the already opened customer tab should be Selected
Hi Fahad,
We are validating your reported query. We will validate and update you in two business days. We appreciate your patience until then.
Regards,
Gokul T.
Any update?
Hi Fahad,
We have created a sample based on your requirement. Please refer to the attached sample for your reference.
Regards,
Gokul T.
Hi Gokul, the sample you provided is exactly what is wanted.
thank you so much.
Hi Fahad,
Regards,
Gokul T.