Step 3 : The MainPage.xaml file is as in the following code:
Code :
<Page
x:Class="App9.MainPage"
IsTabStop="false"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App9"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid x:Name="LayoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="0.112*"/>
<RowDefinition Height="0.081*"/>
<RowDefinition Height="0.058*"/>
<RowDefinition Height="0.054*"/>
<RowDefinition Height="0.052*"/>
<RowDefinition Height="0.056*"/>
<RowDefinition Height="0.056*"/>
<RowDefinition Height="0.529*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.333*"/>
<ColumnDefinition Width="0.022*"/>
<ColumnDefinition Width="0.312*"/>
<ColumnDefinition Width="0.333*"/>
</Grid.ColumnDefinitions>
<Grid.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Yellow" Offset="1"/>
<GradientStop Color="Green"/>
</LinearGradientBrush>
</Grid.Background>
<TextBlock Text="Registration Form" FontSize="30" Foreground="Red" FontWeight="Bold"
TextWrapping="Wrap" Margin="0" Grid.Row="1" HorizontalAlignment="Right"
VerticalAlignment="Center"/>
<TextBlock Text="User Name" FontSize="20" TextWrapping="Wrap" Margin="0" Grid.Row="2"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock HorizontalAlignment="Right" FontSize="20" Margin="0" VerticalAlignment="Center"
Grid.Row="3" Text="Email ID" TextWrapping="Wrap"/>
<TextBlock HorizontalAlignment="Right" FontSize="20" Margin="0" VerticalAlignment="Center"
Grid.Row="4" Text="Course" TextWrapping="Wrap"/>
<TextBlock x:Name="txtval" Grid.Column="2" Grid.Row="5" Text="Please select one course"
FontSize="30" Foreground="Red" FontWeight="Bold" Margin="50,0,0,0"
Visibility="Collapsed">
</TextBlock>
<TextBox x:Name="txtUserName" TextWrapping="Wrap" Margin="0" Grid.Column="2" Grid.Row="2"
d:LayoutOverrides="Height" VerticalAlignment="Center">
<TextBox.Text>
<Binding Mode="TwoWay" Path="UserName" />
</TextBox.Text>
</TextBox>
<TextBox x:Name="txtEmailID" Margin="0" VerticalAlignment="Center"
Grid.Column="2" Grid.Row="3" TextWrapping="Wrap">
<TextBox.Text>
<Binding Mode="TwoWay" Path="EmailID" />
</TextBox.Text>
</TextBox>
<RadioButton x:Name="rbtn1" Grid.Column="2" Grid.Row="4"></RadioButton>
<TextBlock Text="MCA" Grid.Column="2" Grid.Row="4" Margin="50,10,0,10" FontSize="16"></TextBlock>
<RadioButton x:Name="rbtn2" Grid.Column="2" Grid.Row="4" Margin="150,0,0,0" ></RadioButton>
<TextBlock Text="MBA" Grid.Column="2" Grid.Row="4" Margin="200,10,0,10" FontSize="16"></TextBlock>
<RadioButton x:Name="rbtn3" Grid.Column="2" Grid.Row="4" Margin="300,0,0,0" ></RadioButton>
<TextBlock Text="B.Tech" Grid.Column="2" Grid.Row="4" Margin="350,10,0,10" FontSize="16"></TextBlock>
<Button Click="Button_Click_1" Grid.Column="2" Grid.Row="6" Content="Submitted"
Background="Red" HorizontalAlignment="Center"></Button>
</Grid>
</Page>