From the course: Developing UWP Apps: 1 Layout and Navigation

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Creating an adaptive layout

Creating an adaptive layout

- [Instructor] We're back over in Visual Studio to take a look at the concept of having an adaptive layout based on visual states and adaptive triggers. So we're back to just a grid layout here, and if we were to drag through Controls on there, we've got a text block that says here's an image. We have an image of a guy riding this skateboard. There, and then we have a text block down here that says "A guy on a skateboard". You'll notice that we have these three elements that are in place here, and they're not very well distributed. But let's make a change here. Instead of using a Grid, let's change this to the new RelativePanel. We'll add some Padding here of 40. It hasn't changed much on the screen, but notice how it's made some adjustments here based on being in a RelativePanel. Now RelativePanel is going to give us the ability to adjust elements on the screen relative to other elements. So let's introduce now the concept of VisualStates and we'll walk through what these…

Contents