Skip to content

Fix git push error for protected CLA branch #3892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Sep 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
070c9b6
Privacy clarification for logs collection
seaniyer Sep 5, 2019
103323d
Update C#, VB WPF tutorials for .NET Core 3.0
ghogen Sep 6, 2019
2609d7a
update screenshots
ghogen Sep 6, 2019
33b2e4f
recommend .net core for vs 2019
ghogen Sep 6, 2019
1fa626e
Revert "add missing toc entries"
ghogen Sep 6, 2019
d8e06f5
Merge branch 'master' of github.com:MicrosoftDocs/visualstudio-docs-pr
ghogen Sep 6, 2019
729fd12
Revert "Revert "add missing toc entries""
ghogen Sep 6, 2019
e2c18bf
put MSDNSTART on hub page
ghogen Sep 6, 2019
022932d
Fix art border
ghogen Sep 6, 2019
b859e25
Update art border for VB too
ghogen Sep 6, 2019
295f3e0
add notes about .NET Core and VS versions
ghogen Sep 6, 2019
03709c0
Update docs/ide/developer-community-privacy.md
seaniyer Sep 9, 2019
21a8e3e
Update docs/ide/developer-community-privacy.md
seaniyer Sep 9, 2019
dcbdd8d
added windows forms logs
seaniyer Sep 9, 2019
63a1961
Merge pull request #5332 from seaniyer/master
v-shils Sep 9, 2019
87d6b5a
1541468, added fix for TaskyPortable link.
john-par Sep 9, 2019
f52dfb5
1541468, fixed minor typo.
john-par Sep 9, 2019
677c0b6
Merge pull request #5358 from john-par/1541468-clean-up-broken-vs-lin…
PRMerger14 Sep 9, 2019
084d1e3
Merge pull request #5348 from ghogen/msdnstart-keyword
v-albemi Sep 9, 2019
41bf4dc
Merge pull request #5343 from ghogen/net-core-updates
garycentric Sep 10, 2019
f5128f4
Merge pull request #5359 from MicrosoftDocs/repo_sync_working_branch
gewarren Sep 10, 2019
78e2637
Merge pull request #5361 from MicrosoftDocs/master
Taojunshen Sep 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/get-started/csharp/media/vs-2019/exploreide-nameproject.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 35 additions & 25 deletions docs/get-started/csharp/tutorial-wpf.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ ms.workload:

By completing this tutorial, you'll become familiar with many of the tools, dialog boxes, and designers that you can use when you develop applications with Visual Studio. You'll create a "Hello, World" application, design the UI, add code, and debug errors, while you learn about working in the integrated development environment ([IDE](visual-studio-ide.md)).

## Prerequisites

::: moniker range="vs-2017"
If you haven't already installed Visual Studio, go to the [Visual Studio downloads](https://visualstudio.microsoft.com/vs/older-downloads/?utm_medium=microsoft&utm_source=docs.microsoft.com&utm_campaign=vs+2017+download) page to install it for free.
If you haven't already installed Visual Studio, go to the [Visual Studio downloads](https://visualstudio.microsoft.com/vs/older-downloads/?) page to install it for free.
::: moniker-end
::: moniker range=">=vs-2019"
If you haven't already installed Visual Studio, go to the [Visual Studio downloads](https://visualstudio.microsoft.com/downloads) page to install it for free.

- If you haven't already installed Visual Studio, go to the [Visual Studio downloads](https://visualstudio.microsoft.com/downloads/) page to install it for free.
- You can use either .NET Framework or .NET Core for this tutorial. .NET Core is the newer, more modern framework. .NET Core requires Visual Studio 2019 version 16.3 or later.
::: moniker-end

## Configure the IDE
Expand Down Expand Up @@ -70,10 +74,13 @@ When you create an application in Visual Studio, you first create a project and

![View the 'Create a new project' window](../../get-started/media/vs-2019/start-window-create-new-project.png "Screenshot of the 'Create a new project' window")

1. On the **Create a new project** screen, search for "WPF," choose **WPF App (.NET Framework)**, and then choose **Next**.
1. On the **Create a new project** screen, search for "WPF," choose **WPF App (.NET Core)**, and then choose **Next**.

![WPF app template in 'Create a new project' dialog](media/vs-2019/exploreide-newprojectcsharp-vs2019.png "Screenshot of the WPF app template in 'Create a new project' dialog")

> [!NOTE]
> You might find two WPF desktop templates, one for .NET Framework and another for .NET Core. The .NET Core template is available in Visual Studio 2019 version 16.3 and later. You can use either one for this tutorial, but we recommend .NET Core for new development.

1. At the next screen, give the project a name, **HelloWPFApp**, and choose **Create**.

![Name your project 'HelloWPFApp'](./media/vs-2019/exploreide-nameproject.png "Screenshot of the window where you name your project")
Expand All @@ -93,31 +100,23 @@ After you create the project, you can customize it. To do so, choose **Propertie

### Change the name of MainWindow.xaml

Let's give MainWindow a more specific name.

1. In **Solution Explorer**, select *MainWindow.xaml*. You should see the **Properties** window, but if you don't, choose the **View** menu and then the **Properties Window** item. (Or, press **F4**.)

1. Change the **File Name** property to `Greetings.xaml`.

![Properties window with File Name highlighted](../media/exploreide-filenameinpropertieswindow.png "Screenshot of the Properties window with the file name highlighted")

**Solution Explorer** shows that the name of the file is now *Greetings.xaml*, and the nested code file is now named *Greetings.xaml.cs*. This code file is nested under the *.xaml* file node to show they're closely related to each other.

![Properties window and Solution Explorer window with Greetings file name](../media/exploreide-greetingsfilename.png "Screenshot of the Properties window and Solution Explorer window with Greetings file name")
Let's give MainWindow a more specific name. In **Solution Explorer**, right-click on *MainWindow.xaml* and choose **Rename**. Rename the file to *Greetings.xaml*.

## Design the user interface (UI)

If the designer is not open, select *Greetings.xaml* and press **Shift**+**F7** to open the designer.

We'll add three types of controls to this application: a <xref:System.Windows.Controls.TextBlock> control, two <xref:System.Windows.Controls.RadioButton> controls, and a <xref:System.Windows.Controls.Button> control.

### Add a TextBlock control

1. Enter **Ctrl**+**Q** to activate the search box and type **Toolbox**. Choose **View > Toolbox** from the results list.
1. Press **Ctrl**+**Q** to activate the search box and type **Toolbox**. Choose **View > Toolbox** from the results list.

1. In the **Toolbox**, expand the **Common WPF Controls** node to see the TextBlock control.

![Toolbox with the TextBlock control highlighted](../media/exploreide-textblocktoolbox.png "Screenshot of the Toolbox window with the TextBlock control highlighted")

1. Add a TextBlock control to the design surface by choosing the **TextBlock** item and dragging it to the window on the design surface. Center the control near the top of the window.
1. Add a TextBlock control to the design surface by choosing the **TextBlock** item and dragging it to the window on the design surface. Center the control near the top of the window. In Visual Studio 2019 and later, you can use the red guidelines to center the control.

Your window should resemble the following illustration:

Expand Down Expand Up @@ -153,7 +152,7 @@ Next, you'll add two [RadioButton](/dotnet/framework/wpf/controls/radiobutton) c

![Toolbox window with RadioButton control selected](../media/exploreide-radiobuttontoolbox.png "Screenshot of the Toolbox window with the RadioButton control selected")

1. Add two RadioButton controls to the design surface by choosing the **RadioButton** item and dragging it to the window on the design surface. Move the buttons (by selecting them and using the arrow keys) so that the buttons appear side by side under the TextBlock control.
1. Add two RadioButton controls to the design surface by choosing the **RadioButton** item and dragging it to the window on the design surface. Move the buttons (by selecting them and using the arrow keys) so that the buttons appear side by side under the TextBlock control. Use the red guidelines to align the controls.

Your window should look like this:

Expand All @@ -169,11 +168,7 @@ Next, you'll add display text for each RadioButton control. The following proced

### Add display text for each radio button

1. On the design surface, open the shortcut menu for HelloButton by pressing the right mouse button on HelloButton, choose **Edit Text**, and then enter `Hello`.

1. Open the shortcut menu for GoodbyeButton by pressing the right mouse button on GoodbyeButton, choose **Edit Text**, and then enter `Goodbye`.

The XAML markup should now look similar to the following example:
1. Update the **Content** attribute for the `HelloButton` and `GoodbyeButton` to `"Hello"` and `"Goodbye"` in the XAML. The XAML markup should now look similar to the following example:

```xaml
<Grid>
Expand Down Expand Up @@ -205,7 +200,7 @@ The final UI element that you'll add is a [Button](/dotnet/framework/wpf/control

### Add the button control

1. In the **Toolbox**, find the **Button** control, and then add it to the design surface under the RadioButton controls by dragging it to the form in the design view.
1. In the **Toolbox**, find the **Button** control, and then add it to the design surface under the RadioButton controls by dragging it to the form in the design view. If you're using Visual Studio 2019 or later, a red line helps you center the control.

1. In the XAML view, change the value of **Content** for the Button control from `Content="Button"` to `Content="Display"`, and then save the changes.

Expand Down Expand Up @@ -233,7 +228,7 @@ When this application runs, a message box appears after a user chooses a radio b
*Greetings.xaml.cs* opens, with the cursor in the `Button_Click` event.

```csharp
private void Button_Click_1(object sender, RoutedEventArgs e)
private void Button_Click(object sender, RoutedEventArgs e)
{

}
Expand Down Expand Up @@ -280,7 +275,16 @@ We renamed *MainWindow.xaml* to *Greetings.xaml* at the start of this tutorial,

1. Change `StartupUri="MainWindow.xaml"` to `StartupUri="Greetings.xaml"`, and then save the changes.

Start the debugger again (press **F5**). You should see the **Greetings** window of the application. Now close the application window to stop debugging.
Start the debugger again (press **F5**). You should see the **Greetings** window of the application.

::: moniker range="vs-2017"
![Screenshot of running app](media/exploreide-wpf-running-app.png)
::: moniker-end
::: moniker range=">=vs-2019"
![Screenshot of running app](media/vs-2019/exploreide-wpf-running-app.png)
::: moniker-end

Now close the application window to stop debugging.

### Debug with breakpoints

Expand Down Expand Up @@ -320,6 +324,12 @@ You can test the code during debugging by adding some breakpoints. You can add b

1. On the menu bar, choose **Debug** > **Disable All Breakpoints**.

### View a representation of the UI elements

In the running app, you should see a widget that appears at the top of your window. This is a runtime helper that provides quick access to some helpful debugging features. Click on the first button, **Go to Live Visual Tree**. You should see a window with a tree that contains all the visual elements of your page. Expand the nodes to find the buttons you added.

![Screenshot of Live Visual Tree window](media/vs-2019/exploreide-live-visual-tree.png)

### Build a release version of the application

Now that you've verified that everything works, you can prepare a release build of the application.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 32 additions & 17 deletions docs/get-started/visual-basic/tutorial-wpf.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,29 +94,23 @@ After you create the project, you can customize it. By using the **Properties**

### Change the name of MainWindow.xaml

Let's give MainWindow a more specific name.

1. In **Solution Explorer**, select *MainWindow.xaml*. You should see the **Properties** window, but if you don't, choose the **View** menu and then the **Properties Window** item.

1. Change the **File Name** property to `Greetings.xaml`.

![Properties window with File Name highlighted](../media/exploreide-filenameinpropertieswindow.png)

**Solution Explorer** shows that the name of the file is now *Greetings.xaml*, and the nested code file is now named *Greetings.xaml.vb*. This code file is nested under the *.xaml* file node to show they are closely related to each other.
Let's give MainWindow a more specific name. In **Solution Explorer**, right-click on *MainWindow.xaml* and choose **Rename**. Rename the file to *Greetings.xaml*.

## Design the user interface (UI)

If the designer is not open, select *Greetings.xaml* in **Solution Explorer**, and press **Shift**+**F7** to open the designer.

We will add three types of controls to this application: a <xref:System.Windows.Controls.TextBlock> control, two <xref:System.Windows.Controls.RadioButton> controls, and a <xref:System.Windows.Controls.Button> control.

### Add a TextBlock control

1. Enter **Ctrl**+**Q** to activate the search box and type **Toolbox**. Choose **View > Toolbox** from the results list.
1. Press **Ctrl**+**Q** to activate the search box and type **Toolbox**. Choose **View > Toolbox** from the results list.

2. In the **Toolbox**, expand the **Common WPF Controls** node to see the TextBlock control.

![Toolbox with the TextBlock control highlighted](../media/exploreide-textblocktoolbox.png)

3. Add a TextBlock control to the design surface by choosing the **TextBlock** item and dragging it to the window on the design surface. Center the control near the top of the window.
3. Add a TextBlock control to the design surface by choosing the **TextBlock** item and dragging it to the window on the design surface. Center the control near the top of the window. In Visual Studio 2019 and later, you can use the red guidelines to center the control.

Your window should resemble the following illustration:

Expand Down Expand Up @@ -146,7 +140,7 @@ Next, you'll add two [RadioButton](/dotnet/framework/wpf/controls/radiobutton) c

![Toolbox window with RadioButton control selected](../media/exploreide-radiobuttontoolbox.png)

2. Add two RadioButton controls to the design surface by choosing the **RadioButton** item and dragging it to the window on the design surface. Move the buttons (by selecting them and using the arrow keys) so that the buttons appear side by side under the TextBlock control.
2. Add two RadioButton controls to the design surface by choosing the **RadioButton** item and dragging it to the window on the design surface. Move the buttons (by selecting them and using the arrow keys) so that the buttons appear side by side under the TextBlock control. Use the red guidelines to align the controls.

Your window should look like this:

Expand All @@ -162,9 +156,15 @@ You can now add display text for each RadioButton control. The following procedu

### Add display text for each radio button

1. On the design surface, open the shortcut menu for HelloButton by pressing the right mouse button on HelloButton, choose **Edit Text**, and then enter `Hello`.
Update the **Content** attribute for the `HelloButton` and `GoodbyeButton` to `"Hello"` and `"Goodbye"` in the XAML. The XAML markup should now look similar to the following example:

2. Open the shortcut menu for GoodbyeButton by pressing the right mouse button on GoodbyeButton, choose **Edit Text**, and then enter `Goodbye`.
```xaml
<Grid>
<TextBlock HorizontalAlignment="Left" Margin="252,47,0,0" TextWrapping="Wrap" Text="Select a message option and then choose the Display button." VerticalAlignment="Top"/>
<RadioButton x:Name="HelloButton" Content="Hello" HorizontalAlignment="Left" Margin="297,161,0,0" VerticalAlignment="Top"/>
<RadioButton x:Name="GoodbyeButton" Content="Goodbye" HorizontalAlignment="Left" Margin="488,161,0,0" VerticalAlignment="Top"/>
</Grid>
```

### Set a radio button to be checked by default

Expand All @@ -180,7 +180,7 @@ The final UI element that you'll add is a [Button](/dotnet/framework/wpf/control

### Add the button control

1. In the **Toolbox**, find the **Button** control, and then add it to the design surface under the RadioButton controls by dragging it to the form in the design view.
1. In the **Toolbox**, find the **Button** control, and then add it to the design surface under the RadioButton controls by dragging it to the form in the design view. If you're using Visual Studio 2019 or later, a red line helps you center the control.

2. In the XAML view, change the value of **Content** for the Button control from `Content="Button"` to `Content="Display"`, and then save the changes.

Expand All @@ -200,7 +200,7 @@ When this application runs, a message box appears after a user chooses a radio b
*Greetings.xaml.vb* opens, with the cursor in the `Button_Click` event.

```vb
Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs)
Private Sub Button_Click(sender As Object, e As RoutedEventArgs)

End Sub
```
Expand Down Expand Up @@ -243,7 +243,16 @@ We renamed *MainWindow.xaml* to *Greetings.xaml* at the start of this tutorial,

2. Change `StartupUri="MainWindow.xaml"` to `StartupUri="Greetings.xaml"`, and then save the changes.

Start the debugger again (press **F5**). You should see the **Greetings** window of the application. Now close the application window to stop debugging.
Start the debugger again (press **F5**). You should see the **Greetings** window of the application.

::: moniker range="vs-2017"
![Screenshot of running app](media/exploreide-wpf-running-app.png)
::: moniker-end
::: moniker range=">=vs-2019"
![Screenshot of running app](media/vs-2019/exploreide-wpf-running-app.png)
::: moniker-end

Now close the application window to stop debugging.

### Debug with breakpoints

Expand Down Expand Up @@ -283,6 +292,12 @@ You can test the code during debugging by adding some breakpoints. You can add b

11. On the menu bar, choose **Debug** > **Disable All Breakpoints**.

### View a representation of the UI elements

In the running app, you should see a widget that appears at the top of your window. This is a runtime helper that provides quick access to some helpful debugging features. Click on the first button, **Go to Live Visual Tree**. You should see a window with a tree that contains all the visual elements of your page. Expand the nodes to find the buttons you added.

![Screenshot of Live Visual Tree window](media/vs-2019/exploreide-live-visual-tree.png)

### Build a release version of the application

Now that you've verified that everything works, you can prepare a release build of the application.
Expand Down
1 change: 0 additions & 1 deletion docs/get-started/visual-studio-ide.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ author: gewarren
f1_keywords:
- vs.startpage
- VS.StartPage.HowDoI
- MSDNSTART
ms.author: gewarren
manager: jillfra
ms.workload:
Expand Down
8 changes: 7 additions & 1 deletion docs/ide/developer-community-privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,14 @@ If **Report a problem** is initiated from Visual Studio, we collect one or more

- Python logs, if they exist

- A screenshot, if you choose to include it
- Windows Forms logs, if they exist

> [!NOTE]
> Log files are sent to Microsoft only when you provide permission by submitting the problem report with which they are included. You can see which files are included on the 'Summary' step of the 'Report a Problem' window (see the screenshot included in this note). Collected logs are stored in the %temp% folder and are cleaned up regularly and after each upload. If you don't want to include a log in your problem report, delete the file from the %temp% folder before submitting the report.
> ![Report a Problem - Summary of logs collected](media/report-a-problem-logs-collected.png)

- A screenshot, if you choose to include it

- Recording data, if you choose to include a recording, which includes:

- Steps to reproduce the problem
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
description: Learn how to use Visual Studio to develop applications, services, and tools in the language of your choice, for any platform or device.
ms.topic: hub-page
monikerRange: ">=vs-2017"
f1_keywords:
- MSDNSTART

highlightedContent:
items:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Welcome to Visual Studio! After you have [downloaded](http://www.visualstudio.co

- **[Make cross-platform mobile apps in C# or Visual Basic (Xamarin)](../cross-platform/visual-studio-and-xamarin.md)** : Get started using Visual Studio and Tools for Xamarin to create mobile apps that run on Android, iOS, and the Universal Windows Platform from a shared code base.

Load a sample:[Tasky Portable](http://developer.xamarin.com/samples/mobile/TaskyPortable/) (native UI) or [Xamarin Forms Todo sample](https://github.com/xamarin/xamarin-forms-samples/tree/master/Todo) (Xamarin.Forms shared UI) &#124; [Do a tutorial](https://msdn.microsoft.com/library/dn879698\(v=vs.140\).aspx) &#124; [Browse the docs](https://msdn.microsoft.com/library/mt299001.aspx) &#124; [Watch a video](https://channel9.msdn.com/Series/Cross-Platform-Development-with-Xamarin--Visual-Studio/01)
Load a sample: [TaskyPortable](https://github.com/xamarin/mobile-samples/tree/master/TaskyPortable) (native UI) or [Xamarin Forms Todo sample](https://github.com/xamarin/xamarin-forms-samples/tree/master/Todo) (Xamarin.Forms shared UI) &#124; [Do a tutorial](https://msdn.microsoft.com/library/dn879698\(v=vs.140\).aspx) &#124; [Browse the docs](https://msdn.microsoft.com/library/mt299001.aspx) &#124; [Watch a video](https://channel9.msdn.com/Series/Cross-Platform-Development-with-Xamarin--Visual-Studio/01)

- **[Make native cross-platform apps and libraries in C++](https://www.visualstudio.com/explore/cplusplus-mdd-vs.aspx)** Go here to get started creating C++ apps and libraries that run on Android, iOS, and the Universal Windows Platform.

Expand Down