Skip to content

Fix: Prematurely referring to "Greetings.xaml.cs" #7897

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 1 commit into from
Apr 20, 2022
Merged
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions docs/get-started/csharp/tutorial-wpf.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,11 @@ The final UI element that you'll add is a [Button](/dotnet/framework/wpf/control

::: moniker range="<=vs-2019"

When this application runs, a message box appears after a user chooses a radio button and then chooses the **Display** button. One message box will appear for Hello, and another will appear for Goodbye. To create this behavior, you'll add code to the `Button_Click` event in *Greetings.xaml.cs*.
When this application runs, a message box appears after a user chooses a radio button and then chooses the **Display** button. One message box will appear for Hello, and another will appear for Goodbye. To create this behavior, you'll add code to the `Button_Click` event in *MainWindow.xaml.cs*.

1. On the design surface, double-click the **Display** button.

*Greetings.xaml.cs* opens, with the cursor in the `Button_Click` event.
*MainWindow.xaml.cs* opens, with the cursor in the `Button_Click` event.

```csharp
private void Button_Click(object sender, RoutedEventArgs e)
Expand Down Expand Up @@ -366,11 +366,11 @@ When this application runs, a message box appears after a user chooses a radio b

::: moniker range=">=vs-2022"

When this application runs, a message box appears after a user chooses a radio button and then chooses the **Display** button. One message box will appear for Hello, and another will appear for Goodbye. To create this behavior, you'll add code to the `Button_Click` event in *Greetings.xaml.cs*.
When this application runs, a message box appears after a user chooses a radio button and then chooses the **Display** button. One message box will appear for Hello, and another will appear for Goodbye. To create this behavior, you'll add code to the `Button_Click` event in *MainWindow.xaml.cs*.

1. On the design surface, double-click the **Display** button.

*Greetings.xaml.cs* opens, with the cursor in the `Button_Click` event.
*MainWindow.xaml.cs* opens, with the cursor in the `Button_Click` event.

```csharp
private void Button_Click(object sender, RoutedEventArgs e)
Expand Down