Step 3 : The MainPage.xaml file is as in the following code:
Code :
<Page
x:Class="App1.MainPage"
IsTabStop="false"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App4"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="Lime">
<Grid.ColumnDefinitions>
<ColumnDefinition Width=".333*"></ColumnDefinition>
<ColumnDefinition Width=".053*"></ColumnDefinition>
<ColumnDefinition Width=".333*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="40*"></RowDefinition>
<RowDefinition Height="2*"/>
<RowDefinition Height="0*"/>
<RowDefinition Height="36*"></RowDefinition>
<RowDefinition Height="3*"/>
<RowDefinition Height="0*"/>
<RowDefinition Height="32*"></RowDefinition>
<RowDefinition Height="52*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="4*"/>
<RowDefinition Height="39*"></RowDefinition>
<RowDefinition Height="555*"></RowDefinition>
</Grid.RowDefinitions>
<TextBlock Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
Text="Count Hours Between Two Dates" FontSize="30"
FontWeight="ExtraBold" HorizontalAlignment="Center"
Margin="515,0,389,0" Grid.RowSpan="2" Width="462"></TextBlock>
<TextBlock Text="First Date" FontSize="20" Grid.Column="0"
Grid.Row="3" HorizontalAlignment="Right" FontWeight="Bold"
Foreground="Red" Grid.ColumnSpan="2" Margin="0,0,100,0" Width="90"/>
<TextBlock Text="Second Date" FontSize="20" Grid.Column="0"
Grid.Row="6" HorizontalAlignment="Right" FontWeight="Bold"
Foreground="Red" Width="118" Grid.RowSpan="4"></TextBlock>
<TextBox x:Name="txt1" FontSize="20" Grid.Column="2" Grid.Row="3"
HorizontalAlignment="Left" FontWeight="Bold" Width="200" Margin="0,0,0,2"/>
<TextBox x:Name="txt2" FontSize="20" Grid.Column="2"
Grid.Row="6" HorizontalAlignment="Left"
FontWeight="Bold" Width="200" />
<Button Content="click" Grid.Row="7" VerticalAlignment="Bottom"
Width="91" Background="Red" Click="Button_Click_1"
Height="38" Grid.Column="1"/>
<TextBlock Text="Result" FontSize="20" Grid.Column="0" Grid.Row="10"
HorizontalAlignment="Right" FontWeight="Bold"
Foreground="Red" Width="58"></TextBlock>
<TextBox x:Name="txt3" FontSize="20" Grid.Column="2" Grid.Row="10"
HorizontalAlignment="Left" FontWeight="Bold" Width="200"
Margin="0,0,0,1"></TextBox>
</Grid>
</Page>