Skip to content

Commit a9fcae5

Browse files
committed
Merging changes synced from https://github.com/MicrosoftDocs/visualstudio-docs-pr (branch live)
2 parents 4cf78af + b172782 commit a9fcae5

File tree

5 files changed

+32
-51
lines changed

5 files changed

+32
-51
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3920,6 +3920,11 @@
39203920
"redirect_url": "/visualstudio/xaml-tools/creating-a-ui-by-using-xaml-designer-in-visual-studio",
39213921
"redirect_document_id": true
39223922
},
3923+
{
3924+
"source_path": "docs/designers/getting-started-with-wpf.md",
3925+
"redirect_url": "/visualstudio/get-started/csharp/tutorial-wpf",
3926+
"redirect_document_id": true
3927+
},
39233928
{
39243929
"source_path": "docs/debugger/debug-xaml-in-blend.md",
39253930
"redirect_url": "/visualstudio/xaml-tools/debug-xaml-in-blend",

docs/designers/getting-started-with-wpf.md

Lines changed: 0 additions & 40 deletions
This file was deleted.

docs/get-started/csharp/tutorial-wpf.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Hello World app with WPF in C#"
33
description: Create a simple Windows Desktop .NET app in C# with Visual Studio using the Windows Presentation Foundation (WPF) UI framework.
44
ms.custom: "vs-acquisition, get-started"
5-
ms.date: 09/14/2021
5+
ms.date: 10/31/2022
66
ms.prod: visual-studio-windows
77
ms.technology: vs-ide-general
88
ms.topic: tutorial
@@ -15,7 +15,7 @@ manager: jmartens
1515
ms.workload:
1616
- "dotnet"
1717
---
18-
# Tutorial: Create a simple application with C\#
18+
# Tutorial: Create a simple WPF application with C\#
1919

2020
[!INCLUDE [Visual Studio](~/includes/applies-to-version/vs-windows-only.md)]
2121

@@ -24,9 +24,15 @@ By completing this tutorial, you'll become familiar with many of the tools, dial
2424
## Prerequisites
2525

2626
- 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.
27-
- Make sure the **.NET desktop development** workload is installed. You can verify this in the Visual Studio Installer.
27+
- Make sure the **.NET desktop development** workload is installed. You can verify this in the Visual Studio Installer.
2828
- 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.
2929

30+
## What is WPF?
31+
32+
WPF, or Windows Presentation Foundation, is a UI (user interface) framework that creates desktop client applications. The WPF development platform supports a broad set of application development features, including an application model, resources, controls, graphics, layout, data binding, documents, and security.
33+
34+
WPF is part of .NET, so if you have previously built applications with .NET using ASP.NET or Windows Forms, the programming experience should be familiar. WPF uses the Extensible Application Markup Language [XAML](../../xaml-tools/xaml-overview.md) to provide a declarative model for application programming. For more information, see [WPF .NET overview](/dotnet/desktop/wpf/overview/?view=netdesktop-6.0&preserve-view=true).
35+
3036
## Configure the IDE
3137

3238
When you launch Visual Studio, the start window opens first. Select **Continue without code** to open the development environment. You'll see tool windows, the menus and toolbars, and the main window space. Tool windows are docked on the left and right sides of the application window. The search box, menu bar, and the standard toolbar are located at the top. When you load a solution or project, editors and designers appear in the central space of the application window. When you develop an application, you'll spend most of your time in this central area.
@@ -103,7 +109,7 @@ After you create the project, you can customize it. To do so, choose **Propertie
103109

104110
## Design the user interface (UI)
105111

106-
If the designer is not open, select *MainWindow.xaml* and press **Shift**+**F7** to open the designer.
112+
If the designer isn't open, select *MainWindow.xaml* and press **Shift**+**F7** to open the designer.
107113

108114
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.
109115

@@ -486,7 +492,7 @@ You can test the code during debugging by adding some breakpoints. You can add b
486492
1. Press the **F9** key to add a breakpoint, and then press **F5** to start debugging.
487493

488494
1. In the **Greetings** window, choose the **Hello** radio button, and then choose the **Display** button.
489-
495+
490496
The line `MessageBox.Show("Hello.")` is highlighted in yellow. At the bottom of the IDE, the Autos, Locals, and Watch windows are docked together on the left side, and the Call Stack, Breakpoints, Exception Settings, Command, Immediate, and Output windows are docked together on the right side.
491497

492498
:::image type="content" source="media/vs-2022/explore-ide-debug-breakpoint.png" alt-text="Screenshot of a debug session in Visual Studio. The code window for Greetings.xaml.cs shows execution stopped at a breakpoint with a line highlighted in yellow.":::
@@ -518,7 +524,7 @@ In the running app, you should see a widget that appears at the top of your wind
518524
::: moniker-end
519525
::: moniker range=">=vs-2022"
520526

521-
:::image type="content" source="media/vs-2022/explore-ide-live-visual-tree.png" alt-text="Screenshot of the Live Visual Tree window, showing the tree of visual elements in HelloWPFApp.exe while it is running.":::
527+
:::image type="content" source="media/vs-2022/explore-ide-live-visual-tree.png" alt-text="Screenshot of the Live Visual Tree window, showing the tree of visual elements in HelloWPFApp.exe while it's running.":::
522528

523529
::: moniker-end
524530
### Build a release version of the application

docs/get-started/visual-basic/tutorial-wpf.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.workload:
1111
- "dotnet"
1212
dev_langs:
1313
- "VB"
14-
ms.date: 01/07/2022
14+
ms.date: 10/31/2022
1515
ms.custom: "vs-acquisition, get-started"
1616
---
1717
# Tutorial: Create a WPF application with Visual Basic
@@ -32,6 +32,12 @@ In this tutorial, you learn how to:
3232
> - Debug with breakpoints
3333
> - Build a release version
3434
35+
## What is WPF?
36+
37+
WPF, or Windows Presentation Foundation, is a UI (user interface) framework that creates desktop client applications. The WPF development platform supports a broad set of application development features, including an application model, resources, controls, graphics, layout, data binding, documents, and security.
38+
39+
WPF is part of .NET, so if you have previously built applications with .NET using ASP.NET or Windows Forms, the programming experience should be familiar. WPF uses the Extensible Application Markup Language [XAML](../../xaml-tools/xaml-overview.md) to provide a declarative model for application programming. For more information, see [WPF .NET overview](/dotnet/desktop/wpf/overview/?view=netdesktop-6.0&preserve-view=true).
40+
3541
## Prerequisites
3642

3743
::: moniker range="vs-2019"
@@ -67,7 +73,7 @@ The **WPF Designer** shows a design view and a XAML view of *MainWindow.xaml* in
6773

6874
::: moniker range=">=vs-2022"
6975
1. Open Visual Studio.
70-
76+
7177
1. On the start window, choose **Create a new project**.
7278

7379
:::image type="content" source="media/vs-2022/start-window-create-new-project.png" alt-text="Screenshot of the start window in Visual Studio 2022 with the 'Create a new project' option highlighted.":::

docs/ide/class-designer/how-to-add-class-diagrams-to-projects.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Add Class Diagrams to projects (Class Designer)
33
description: Learn how to design, edit, and refactor classes and other types, add a class diagram to your C#, Visual Basic, or C++ project.
44
ms.custom: SEO-VS-2020
5-
ms.date: 11/11/2021
5+
ms.date: 10/31/2022
66
ms.topic: how-to
77
helpviewer_keywords:
88
- class diagrams, creating
@@ -21,8 +21,12 @@ ms.workload:
2121

2222
To design, edit, and refactor classes and other types, add a class diagram to your C#, Visual Basic, or C++ project. To visualize different parts of the code in a project, add multiple class diagrams to the project.
2323

24+
::: moniker range="<=vs-2019"
25+
2426
You can't create class diagrams from projects that share code across multiple apps. To create UML class diagrams, see [Create UML modeling projects and diagrams](https://devblogs.microsoft.com/devops/uml-designers-have-been-removed-layer-designer-now-supports-live-architectural-analysis/).
2527

28+
::: moniker-end
29+
2630
## Install the Class Designer component
2731

2832
If you haven't installed the **Class Designer** component, follow these steps to install it.
@@ -50,7 +54,7 @@ If you haven't installed the **Class Designer** component, follow these steps to
5054

5155
The **Add New Item** dialog opens.
5256

53-
2. Expand **Common Items** > **General**, and then select **Class Diagram** from the template list. For Visual C++ projects, look in the **Utility** category to find the **Class Diagram** template.
57+
2. Expand **General**, and then select **Class Diagram** from the template list. For Visual C++ projects, look in the **Utility** category to find the **Class Diagram** template.
5458

5559
> [!NOTE]
5660
> If you don't see the **Class Diagram** template, [follow the steps](#install-the-class-designer-component) to install the **Class Designer** component for Visual Studio.
@@ -68,7 +72,7 @@ In **Solution Explorer**, open a class file's context menu (right-click) and the
6872
In **Class View**, open the namespace or type context menu and then choose **View Class Diagram**.
6973

7074
> [!TIP]
71-
> If **Class View** is not open, open **Class View** from the **View** menu.
75+
> If **Class View** is not open, open **Class View** from the **View** menu. Or, press **Ctrl**+**Shift**+**C**.
7276
7377
## To display the contents of a complete project in a class diagram
7478

0 commit comments

Comments
 (0)