Binding TabControls and other List Contorls
- When Binding controls to ListControl we can bind a control to a specific value of that tab control
- This allows us to bind controls that are not necessarily on the Tab Control, to a specific Tab.
- We can use this method to display a control across many tabs.
Demo
- Add a new UIController called DemoTabControl
- We'll add a local
TextColumncalled "MyTab" - We'll add a TabControl to the View and Bind it's data to the
MyTabcolumn - We'll set the
Valuesproperty to "A, B, C" to create 3 tabs - We can use the "Show Next Tab" and "Show Previous Tab" to navigate through the different Tabs.

- We'll change the TabControl's
Styleproperty toFlat - We'll use the "Send To Back" button to send the TabControl to back
- We'll add a new label with the text "Bind to A", and use the
BoundToproperty to bind it to the TabControl and set it'sContextto 0 - meaning the first tab.

- We can switch back and forth between the tabs using the "Show Next Tab" option, and see how the label disappears when a different Tab is selected
- Add another label, called "Label on B" and place it on the tab's border so it exceeds the tab's border
- We'll use the
BoundToproperty to bind it to the TabControl and set it'sContextto 1, meaning the second tab. - Add another label, called "Label outside the tab" and place it outside the tab
- We'll use the
BoundToproperty to bind it to the TabControl and set it'sContextto 2, meaning the third tab. - Add another label, called "Label that appears on all tabs" and place it in the tab
- Because we don't bind it to any specific context of the tab, it'll appear on all tabs.
This Context setting can be set for any ListControl, including TabContorl, ListBox and ComboBox
Help us improve, Edit this page on GitHub
or email us at info@fireflymigration.com