I have a TabControl in my WPF application. I want my application to basically support multiple "instances" within the same program. For example, think about web browsers, they allow you to have multiple instances of websites on different tabs, I want to achieve similar functionality, where my application contains several instances of "routines".
The problem that I am facing right now is that I have to copy the same XAML to each tab, because each tab has exactly the same layout and user interface, but different data. Another problem is that I need the functionality to dynamically create these tabs.
Here is a screenshot of my application in its current state. As you can see, in the upper part there are 2 tabs, and the second is a transparent background, since it is inactive.

So, how to create a tab system in which the tab user interface remains the same for each tab, and I only need to develop using one XAML interface and duplicate it for each tab?
Requirements:
- Each tab has the same interface.
- Each tab has different data for user interface elements.
- As a developer, I want to work on the XAML tab only once and directly in Visual Studio.
Ideally, I would like a simple simple example of a project / code in which there is one control with an unsecured contribution, and the application dynamically creates 2-n tabs at startup, all of which have the same interface, but with different data.
Tower
source share