You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -135,7 +135,7 @@ This code uses the keyword `foreach` in C# or `For Each` in Visual Basic.
135
135
136
136
The icons are visible now because you haven't hidden them. To hide them from the player, you can set each label's **ForeColor** property to the same color as its **BackColor** property.
137
137
138
-
1. Stop the program. Remove the comment marks for the commented line of code inside the loop.
138
+
1. Stop the program. Remove the comment marks for the commented line of code inside the loop in the `AssignIconsToSquares()` method.
If you're using C#, put the code after the opening curly brace and just after the class declaration (`public partial class Form1 : Form`). If you're using Visual Basic, put the code right after the class declaration (`Public Class Form1`).
49
51
50
52
These statements don't cause Label controls to appear on the form because there's no `new` keyword.
51
53
When the program starts, both `firstClicked` and `secondClicked` are set to `null` for C# or `Nothing` for Visual Basic.
52
54
53
-
2. Modify your <xref:System.Windows.Forms.Control.Click> event handler to use the new `firstClicked` reference variable.
55
+
2. Modify your <xref:System.Windows.Forms.Control.Click> event handler in `Form1.cs` or `Form1.vb`to use the new `firstClicked` reference variable.
54
56
Remove the last statement in the `label1_Click()` event handler method (`clickedLabel.ForeColor = Color.Black;`) and replace it with the `if` statement as follows.
55
57
56
58
### [C#](#tab/csharp)
@@ -94,7 +96,7 @@ If the icons don't match, it hides the two icons again after a short period of t
94
96
Your program calls the <xref:System.Windows.Forms.Timer.Start> method to start the timer after the player chooses the second label.
95
97
96
98
4. Choose the timer control icon and then press **Enter**, or double-click the timer.
97
-
The IDE adds an empty Tick event handler.
99
+
The IDE adds an empty Tick event handler to `Form1.cs` or `Form1.vb`.
98
100
Replace the code with the following code.
99
101
100
102
### [C#](#tab/csharp)
@@ -109,7 +111,7 @@ If the icons don't match, it hides the two icons again after a short period of t
109
111
- It uses two reference variables, `firstClicked` and `secondClicked`, to make the icons of the two labels that the player chose invisible again.
110
112
- It resets the `firstClicked` and `secondClicked` reference variables to `null` in C# and `Nothing` in Visual Basic.
111
113
112
-
5. Go to the code editor and add code to the top and bottom of the `label1_Click()` event handler method.
114
+
5. Go to the code editor and add code to the top and bottom of the `label1_Click()` event handler method in `Form1.cs` or `Form1.vb`.
113
115
This code will check if the timer is enabled, set the `secondClicked` reference variable, and start the timer.
114
116
The `label1_Click()` event handler method now looks as follows:
Copy file name to clipboardExpand all lines: docs/get-started/csharp/tutorial-wpf.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,7 @@
2
2
title: "Hello World app with WPF in C#"
3
3
description: Create a simple Windows Desktop .NET application in C# with Visual Studio by using the Windows Presentation Foundation (WPF) UI framework.
4
4
ms.custom: vs-acquisition
5
-
ms.date: 11/17/2023
6
-
5
+
ms.date: 10/18/2024
7
6
ms.subservice: general-ide
8
7
ms.topic: tutorial
9
8
dev_langs:
@@ -160,7 +159,7 @@ We add three types of controls to this application: a <xref:System.Windows.Contr
160
159
161
160
### Customize the text in the text block
162
161
163
-
1. In the XAML view, locate the markup for **TextBlock** and change the **Text** attribute from `TextBox` to `Select a message option and then choose the Display button.`
162
+
1. In the XAML view, locate the markup for **TextBlock** and change the **Text** attribute from `TextBlock` to `Select a message option and then choose the Display button.`
164
163
165
164
The XAML markup should look something like the following example:
Copy file name to clipboardExpand all lines: docs/ide/editor-sticky-scroll.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: About the Editor Sticky Scroll feature
3
3
description: Use the Sticky Scroll feature in Visual Studio to quickly view code scopes at the top of the editor, which helps you stay in the right context while you code.
Copy file name to clipboardExpand all lines: docs/ide/use-solution-explorer.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Learn about Solution Explorer
3
3
description: Use Solution Explorer in Visual Studio and review the context menu options to manage the projects and files in a solution.
4
-
ms.date: 10/04/2024
4
+
ms.date: 10/18/2024
5
5
ms.topic: conceptual
6
6
helpviewer_keywords:
7
7
- solution explorer [Visual Studio]
@@ -39,6 +39,8 @@ The following table is a text-equivalent of the annotated screenshot, but with a
39
39
|**Program** node | View, edit, and manage your program or application (app) |
40
40
|[**Git Changes** tab](../version-control/git-with-visual-studio.md)| Use Git & GitHub within Visual Studio to collaborate on projects with your team |
41
41
42
+
To view more of the application images and icons that appear in Visual Studio, download the [Visual Studio Image Library](https://www.microsoft.com/download/details.aspx?id=35825).
43
+
42
44
### Solution Explorer toolbar
43
45
44
46
To continue, let's take a closer look at the toolbar in Solution Explorer.
@@ -168,3 +170,4 @@ You can use the **New Solution Explorer View** to add a new scoped Solution Expl
168
170
-[What are solutions and projects in Visual Studio?](solutions-and-projects-in-visual-studio.md)
169
171
-[What is the .NET Project Designer?](reference/project-properties-reference.md)
170
172
-[Customize window layouts and personalize tabs in Visual Studio](customizing-window-layouts-in-visual-studio.md)
173
+
-[Visual Studio Image Library](https://www.microsoft.com/download/details.aspx?id=35825)
0 commit comments