I am trying to get two buttons to share the same width in a Relative Panel layout in Visual Studio with build UWP application but cannot seem to find resources or anything to show me how to do this.
Can any one help or give me some resources to go to? Please do not downgrade this question without suggestion.
Here's a solution with RelativePanel although the Grid solution presented by @al1Dima is also valid
<RelativePanel>
<Button x:Name="LeftButton" Content="Left" HorizontalAlignment="Stretch"
RelativePanel.AlignLeftWithPanel="True" RelativePanel.LeftOf="Divider" />
<Border x:Name="Divider" RelativePanel.AlignHorizontalCenterWithPanel="True"/>
<Button x:Name="RightButton" Content="Right" HorizontalAlignment="Stretch"
RelativePanel.AlignRightWithPanel="True" RelativePanel.RightOf="Divider" />
</RelativePanel>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With