Use the TabControl to split your interface up into different areas, each accessible by clicking on a tab header. Tab headers are content controls, which means they support complex UI. Tab headers appear at the top of the tab control by default. Use the TabStripPlacement property to position the headers in other locations.
- [Instructor] The TabControl is another element…that is commonly used for layout of UI…in a WPF application.…Unlike all the the other layout panels…I've shown you in this chapter,…it does not derive from the PanelBase class,…instead it derives from a class called ItemsControl,…which means it's related to classes like the…ListBox and the ComboBox…and this allows you to do things like…put collections of data in the TabControl…and data bind the TabControl,…but for this demonstration I'm just looking at it…as far as a layout system.…
So you put a TabControl in there,…it has different tabs across the top…and the user can click on these…to navigate to different parts of the UI.…The way you do this is you put a TabControl in your XAML…and then you put one TabItem for each tab…that you want on the screen, like this,…and then you specify the text that the user sees…by setting the header property.…In this case, I set it to tab one,…and then inside the TabItem,…you set the content.…It looks like this.…
Now here's where it gets interesting.…
- Exploring the layout panels
- Working with the grid
- Adding rows and columns
- Creating scrolling content
- Controlling element visibility
- Aligning content
- Making custom layout panels
Skill Level Intermediate
1. Layout Panels
2. Other Layout Concepts
3. Custom Layout Panel
Next steps1m 34s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.