Started reading John Sharp - Microsoft Visual C #. Detailed guide - 2017 . I got to the end of the first chapter, where they describe how to make a program on a UWP- universal application after "Hello World" in the console (I’ve dealt only with the console and the Windows Form before) .
I follow the instructions for a simple program where you take a name and she welcomes you. Accepted a developer agreement. Then, judging by the description and screenshots from the textbooks, I began to work here:
Pinned TextBlock, TextBox and a button. Looked at the code on XAML , like everything is normal too.
<Grid> <TextBlock HorizontalAlignment="Left" Margin="10,10,0,0" TextWrapping="Wrap" Text="Пожалуйста, введите своё имя:" VerticalAlignment="Top" Height="35" Width="355" FontSize="24"/> <TextBox x:Name="userName" HorizontalAlignment="Left" Margin="10,45,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Height="43" Width="241"/> <Button x:Name="ok" Content="OK" HorizontalAlignment="Left" Margin="256,36,0,0" VerticalAlignment="Top" Height="62" Width="72" Click="okClick"/> </Grid> The tutorials are then asked to do a trial run. Select a local computer (so that they don’t search for a device) => Debug => Start Debug . In the textbook they say that my form elements should appear, but I do not display anything.
In the upper right corner, 060 and 001 (Ping?) Are displayed.
I think, okay, maybe not lucky. I read on. I add an event handler for a click in MainPage.xaml.cs:
private void okClick(object sender, RoutedEventArgs e) { MessageDialog msg = new MessageDialog("Привет, " + userName.Text); msg.ShowAsync(); } Run again, nothing. Tell me where I turned the wrong way? Why the program is not displayed, although following the instructions of the textbook everything should be fine.
PS I use Visual Studio 2013.
PS This task starts with page 49.
UPDATE: (in comments about permission)
from the textbook:
my:



