Relative panels are useful when you have nested panels in your application UI, but not in a fashion that uses a proper linear pattern to define the layout. In this type of panel, the elements are arranged in relation to the other panels described by various attached properties.
By default, an element positions itself at the top-left corner of the panel, but you can reposition it by defining relative panel alignment. There are three types of relative alignment possible in UWP applications:
- Panel alignment:
- AlignLeftWithPanel
- AlignTopWithPanel
- AlignRightWithPanel
- AlignBottomWithPanel
- AlignHorizontalCenterWithPanel
- AlignVerticalCenterWithPanel
- Sibling alignment:
- AlignLeftWith
- AlignTopWith
- AlignRightWith
- AlignBottomWith ...