Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Basic Example of UWP RelativePanel for Adaptive UI
WhatsApp
Sumit Joshi
Aug 05
2015
3.3
k
0
3
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
Up Next
Basic Example of UWP RelativePanel for Adaptive UI