The StackPanel arranges child elements in vertical or horizontal stack. Each child is stacked below the previous element in a vertical stack on to the right of the previous element in a horizontal stack.
- [Narrator] The StackPanel is a simple layout control.…Here's some information about it I wrote…in this About.txt file.…The purpose of the StackPanel is to arrange…these child elements in a single column or a single row.…It has a interesting property, or useful property,…called Orientation.…If you set the orientation to Vertical,…then each child is placed below the previous element.…If you specify a Horizontal orientation…then each child is placed to the right…of the previous element.…
The StackPanel makes some decisions about the sizes…of its children and here's the rules it uses.…In the Vertical orientation, it sizes each child…to the full width of the StackPanel.…To be clear, you can override this.…If you have a text box in the StackPanel…and you set it to 50 pixels width,…then the StackPanel will try to honor that width.…But if you don't specify a width,…then it will size it to the width of the StackPanel.…As far as the height goes, the StackPanel tries to…minimize the height so it'll use…the minimum necessary height that can show…
- 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
Learning Visual Studio Team Serviceswith Jose Miguel Rady Allende1h 17m 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?
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.