I am a Beginner at C#, WPF and XAML.
How do I bind a WPF Class to a TabItem in another WPF Class?
What I am trying to do is create a WPF Window with multiple Tabs and then for ease of use & maintenance to create separate classes each containing all the display and processing details for what goes under the each TabItem.
Below is a TabItem. Lets say I have a class called
ClientAddressItems
.
How would I bind it and all its contents to the below TabItem? Clearly, The TabItem has a lot of code including a TabControl above it and also has many other TabItems below it.
<!--
<TabItem Name="Item_Addresses"
Header="Addresses"
Grid.ColumnSpan="7"
Style="{StaticResource tabItemLevel3}"
BorderBrush="#FFCCCCCC">
</TabItem>
Just to clarify the deapth of what I am trying to do. Please note:
In the actual application:
1. The main screen will have many TabItems with TabItems within each.
2.i.e, TAB1================TAB2=============TAB3
........Tab1A,Tab1B,Tab1C, etc for each Tab
3. Now Tab1A is would bind to a seperate Class.
4. This seperate Class will definately have an Address List. But will also have a number of TabItems under that and each one of those TabItems would need to bind to another seperate Class.
In summary I guess using adresses is a bad example.
The tree of tabs would be something like this: Only not the Tab names listed.
Lvl1 tabs - Maintenance Tab, Trade Tab, etc
Lvl2 tabs - Client Maint Tab, Customer Maint, Country Maint, etc - under the Maint Tab
Lvl3 tabs - Client Addresses Tab, Client Contacts, Client Branches, Client ...., etc - under Client Maint
Lvl4 tabs, etc
As you can see this can become ver large.