Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement HorizontalAlignment="Stretch" in RelativePanel while creating Universal Windows Platforms 10 Apps?

Tags:

windows

uwp

I know how to implement it using Grid and StackPanel, can it done here without that?

like image 782
Hemant-Webo Avatar asked Sep 30 '15 10:09

Hemant-Webo


1 Answers

Sure, just align it left and right with panel! For example:

Horizontal stretch

<RelativePanel>
    <TextBox RelativePanel.AlignLeftWithPanel="True"
             RelativePanel.AlignRightWithPanel="True" />
</RelativePanel>

If you want vertical stretch, do the similar thing, just align the top and bottom with panel:

Vertical stretch

<RelativePanel>
    <TextBox RelativePanel.AlignTopWithPanel="True"
             RelativePanel.AlignBottomWithPanel="True" />
</RelativePanel>
like image 92
Igor Ralic Avatar answered Nov 10 '22 12:11

Igor Ralic