Creating a Hello World application in Windows 10 which will
target Universal Windows Plateform (UWP).
Basic Requirements:
- Visual Studio 2015
- Windows 10
Click here for How to setup for UWP development
1.
Launch Visual Studio and select
New Project.
2.
Select Windows > Universal >
Blank App. Click ok and there you have your first UWP application!
4. Add a Button and a TextBlock to
your view through toolbar or by adding this XAML code in the Grid tag. Don’t forget to add Name attribute to them.
<Button Name="ClickMeButton"
Content="Click Me" Margin="10,10,0,598"
/>
<TextBlock x:Name="MessageTextBlock"
HorizontalAlignment="Left"
Margin="10,150,0,0"
TextWrapping="Wrap"
Text=""
VerticalAlignment="Top"
FontSize="48"/>
5.
Select the Button you made and click on Properties and then Click on Event Handler icon
6. Double
click in the text box labeled as Click
7.
Code behind file of MainPage will open up.
8.
Enter following code in ClickMeButton_Click function.
MessageTextBlock.Text = "Hello World";
9.
Click on Local
Machine to run your project.

10.
Done!







Superb!
ReplyDelete