The new Relativepanel implements a style of layout that's defined by the relationships between it child element S. It ' s intended for use in creating app layouts, can adapt to changes on screen resolution. TheRelativepanel eases the process of rearranging elements by defining relationships between elements, which allo WS-To-build more dynamic UI without using nested layouts.
In the following example, BlueButton 'll appear to the right of TextBox1 regardless of changes in Orien Tation or layout, and Orangebutton would appear immediately below, and aligned with, BlueButton-even as T He width of textBox1 changes as text is typed into it. It would previously has required rows and columns in aGrid to achieve this effect, but now it can is done using Far less markup.
Xaml
<RelativePanel> <textbox x:name= "TextBox1" text= "TextBox" margin= "5"/> <button x:name= " BlueButton "margin=" 5 "background=" LightBlue "content=" Buttonright "relativepanel.rightof=" TextBox1 "/> < Button X:name= "Orangebutton" margin= "5" background= "Orange" content= "Buttonbelow" relativepanel.rightof= " TextBox1 "relativepanel.below=" BlueButton "/></RelativePanel>
Windows Ten Relativepanel