Introduction
Universal Windows Platform (UWP) allows you to build apps that work on all devices that run on windows 10.
Getting Started
- First of all, install visual studio 2015 Enterprise.
- 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.
- <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Margin="0,0,-772,0">
- <StackPanel x:Name="contentPanel" Margin="8,32,55,46">
- <TextBlock Text="Hello, world!" Margin="0,0,0,40"/>
- <TextBlock Text="What's your name?"/>
- <StackPanel x:Name="inputPanel" Orientation="Horizontal" Margin="0,20,0,20">
- <TextBox x:Name="nameInput" Width="280" HorizontalAlignment="Left"/>
- <Button x:Name="btn" Content="Say "Hello"" Click="btn_Click" Height="39" Width="154"/>
- <Button x:Name="button" Content="Open Popup" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="36" Width="145" Click="button_Click"/>
- </StackPanel>
- <TextBlock x:Name="txtOutput"/>
- </StackPanel>
- </Grid>
- private void btn_Click(object sender, RoutedEventArgs e)
- {
- txtOutput.Text = "Hello " + nameInput.Text;
- }
- private async void button_Click(object sender, RoutedEventArgs e)
- {
- await new Windows.UI.Popups.MessageDialog("Hello World").ShowAsync();
- }