Explore the internals of a custom layout panel and see how it taps into the two-phase layout process to determine the size and location of each child element.
- [Narrator] The first step in creating a Custom Panel…is to add a class to your project…then derive from this base class called Panel.…Let's see what's interesting about the Panel class.…This an important property it's called the Children property…and it's of type UI Element Collection.…This were you'll find all the Children elements…that are inside your Panel.…The next step is to honor…the two phase layout that WPF does.…So my Panel is going to participate in the two phase layout…and that two phases are Measure and Arrange.…
So during the Measure phase, my Panel will be asked…to measure itself.…And then my job as the author of this custom Panel is…to find all my children and ask them to measure themselves.…And then once they're told me how big they want to be then…I store that information or do something useful with it.…I'll keep it around.…Then I'll be asked to go through my Arrange phase.…During the Arrange phase I'm given…my final size from my parent.…And then I tell my children what their…final position is and their final size.…
- 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?
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.