TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Basic Example of UWP RelativePanel for Adaptive UI
Sumit Joshi
Aug 05
2015
Code
3.2
k
0
3
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
RelativePanel is intended for use in creating app layouts that can adapt to changes in screen resolution and implements a style of layout that is defined by the relationships between its child elements.
The RelativePanel eases the process of rearranging elements by defining relationships between elements, which allows you to build more dynamic UI without using nested layouts.
<
RelativePanel
>
<
TextBox
x:Name
=
"textBox1"
Text
=
"textbox"
Margin
=
"5"
/>
<
Button
x:Name
=
"testButton"
Margin
=
"4"
Background
=
"Blue"
Content
=
"ButtonRight"
RelativePanel.RightOf
=
"textBox1"
/>
<
Button
x:Name
=
"testButton2"
Margin
=
"4"
Background
=
"LightBlue"
Content
=
"ButtonBelow"
RelativePanel.RightOf
=
"textBox1"
RelativePanel.Below
=
"testButton"
/>
</
RelativePanel
>
Adaptive UI
UWP
RelativePanel