Getting Started Windows Universal App


Universal Windows Platform (UWP) allows you to build apps that work on all devices that run on windows 10.
Getting Started
  1. First of all, install visual studio 2015 Enterprise.
  2. Once visual studio started Select File, Then New, Then Project from Menu.
S3. Select Visual C# from installed templates, then select Windows, Select Universal then select Blank App.
4.  Now the project created.
Now open MainPage.XAML and write hello world code.
  1. <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Margin="0,0,-772,0">    
  2. <StackPanel x:Name="contentPanel" Margin="8,32,55,46">    
  3. <TextBlock Text="Hello, world!" Margin="0,0,0,40"/>    
  4. <TextBlock Text="What's your name?"/>    
  5. <StackPanel x:Name="inputPanel" Orientation="Horizontal" Margin="0,20,0,20">    
  6. <TextBox x:Name="nameInput" Width="280" HorizontalAlignment="Left"/>    
  7. <Button x:Name="btn" Content="Say "Hello"" Click="btn_Click" Height="39" Width="154"/>    
  8. <Button x:Name="button" Content="Open Popup" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="36" Width="145" Click="button_Click"/>    
  9. </StackPanel>    
  10. <TextBlock x:Name="txtOutput"/>    
  11. </StackPanel>    
  12. </Grid>    
  13. private void btn_Click(object sender, RoutedEventArgs e)    
  14. {    
  15.   txtOutput.Text = "Hello " + nameInput.Text;    
  16. }    
  17. private async void button_Click(object sender, RoutedEventArgs e)    
  18. {    
  19.   await new Windows.UI.Popups.MessageDialog("Hello World").ShowAsync();    
  20. }