I am trying to make an app in Visual Studio 2015. I am a sort of newbie, so I don't know much. As the title suggests, I am having trouble making the buttons and the page items resize to the size of the frame. Here is my XAML code:
<Page
x:Class="Rodojo_start.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Rodojo_start"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<RelativePanel>
<Button Width="320" Height="45" Name="Manage_btn" Click="Manage_btn_Click" FontFamily="Segoe MDL2 Assets" Content="" Margin="0,0,0,0"></Button>
</RelativePanel>
<RelativePanel>
<Button Width="320" Height="45" Name="Sale_btn" Click="Sale_btn_Click" FontFamily="Segoe MDL2 Assets" Content="" Margin="320,0,0,0"></Button>
</RelativePanel>
<RelativePanel>
<Button Width="320" Height="45" Name="settingsbtn" Click="settingsbtn_Click" FontFamily="Segoe MDL2 Assets" Content="" Margin="640,0,0,0"></Button>
</RelativePanel>
<RelativePanel>
<Button Width="320" Height="45" Name="aboutbtn" Click="aboutbtn_Click" FontFamily="Segoe MDL2 Assets" Content="" Margin="960,0,0,0"></Button>
</RelativePanel>
</Grid>
Right now, The buttons are all 320 pixels wide. I want them to resize themselves, but still keep them at the top of the screen. I tried the "ViewBox" part. That made it resize, but put the buttons in the middle of the screen.
Any help would be greatly appreciated.
Thanks.