Skip to content

Clean up events docs#52607

Merged
adegeo merged 21 commits intomainfrom
adegeo/45772/events
Mar 30, 2026
Merged

Clean up events docs#52607
adegeo merged 21 commits intomainfrom
adegeo/45772/events

Conversation

@adegeo
Copy link
Copy Markdown
Contributor

@adegeo adegeo commented Mar 24, 2026

Summary

  • Move code to appropriate folders
  • Clean up terminology
  • Scrub references to ASP.NET/WinForms as the baseline way to describe events
  • Change how-to articles to property procedural articles that give people steps to implement something
  • Rewrote the "declaring event property" example to a scenario that suits the purpose of event properties

Fixes #45772


Internal previews

📄 File 🔗 Preview link
docs/fundamentals/toc.yml docs/fundamentals/toc
docs/standard/events/how-to-declare-multiple-events-using-event-properties.md Declare multiple events using event properties
docs/standard/events/how-to-raise-and-consume-events.md "Raise and consume events"
docs/standard/events/index.md docs/standard/events/index

@adegeo adegeo marked this pull request as ready for review March 26, 2026 18:20
@adegeo adegeo requested review from a team and BillWagner as code owners March 26, 2026 18:20
Copilot AI review requested due to automatic review settings March 26, 2026 18:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the .NET events documentation set to use more generic, modern examples and relocates/refreshes code snippets to align with the updated guidance (removing older ASP.NET/Windows Forms–centric framing).

Changes:

  • Replace legacy events examples with generic .NET examples and update related links across the events landing page and how-to articles.
  • Move/replace snippet sources into docs/standard/events/snippets/... and wire articles to them via :::code includes.
  • Remove obsolete sample files that referenced System.Windows.Forms.

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.events.other/vb/example3.vb Removes legacy WinForms-based event-properties sample.
samples/snippets/csharp/VS_Snippets_CLR/conceptual.events.other/cs/example3.cs Removes legacy WinForms-based event-properties sample.
docs/standard/events/snippets/index/vb/eventsVB.vbproj Adds VB snippet project for the events index page.
docs/standard/events/snippets/index/vb/Program.vb Adds VB handler-subscription snippet for the events index page.
docs/standard/events/snippets/index/vb/EventExample.vb Adds VB event/delegate/event-args snippets for the events index page.
docs/standard/events/snippets/index/csharp/eventsCS.csproj Adds C# snippet project for the events index page.
docs/standard/events/snippets/index/csharp/Program.cs Adds C# handler-subscription snippet for the events index page.
docs/standard/events/snippets/index/csharp/EventExample.cs Adds C# event/delegate/event-args snippets for the events index page.
docs/standard/events/snippets/how-to-raise-and-consume-events/vb/vb.vbproj Adds VB snippet project for “Raise and consume events”.
docs/standard/events/snippets/how-to-raise-and-consume-events/vb/Program.vb Empty entry-point placeholder file (VB).
docs/standard/events/snippets/how-to-raise-and-consume-events/vb/EventWithDelegate.vb Adds VB example for events using a custom delegate.
docs/standard/events/snippets/how-to-raise-and-consume-events/vb/EventWithData.vb Adds VB example for events carrying custom event data.
docs/standard/events/snippets/how-to-raise-and-consume-events/vb/EventNoData.vb Adds VB example for events without event data.
docs/standard/events/snippets/how-to-raise-and-consume-events/csharp/csharp.csproj Adds C# snippet project for “Raise and consume events”.
docs/standard/events/snippets/how-to-raise-and-consume-events/csharp/Program.cs Empty entry-point placeholder file (C#).
docs/standard/events/snippets/how-to-raise-and-consume-events/csharp/EventWithDelegate.cs Adds C# example for events using a custom delegate.
docs/standard/events/snippets/how-to-raise-and-consume-events/csharp/EventWithData.cs Adds C# example for events carrying custom event data.
docs/standard/events/snippets/how-to-raise-and-consume-events/csharp/EventNoData.cs Adds C# example for events without event data.
docs/standard/events/snippets/how-to-handle-multiple-events-using-event-properties/vb/Sensor.vb Adds VB EventHandlerList-backed event-properties sample.
docs/standard/events/snippets/how-to-handle-multiple-events-using-event-properties/vb/Program.vb Adds VB subscription/handler snippet for event properties sample.
docs/standard/events/snippets/how-to-handle-multiple-events-using-event-properties/vb/EventProperties.vbproj Adds VB snippet project for event-properties how-to.
docs/standard/events/snippets/how-to-handle-multiple-events-using-event-properties/csharp/Sensor.cs Adds C# EventHandlerList-backed event-properties sample.
docs/standard/events/snippets/how-to-handle-multiple-events-using-event-properties/csharp/Program.cs Adds C# subscription/handler snippet for event properties sample.
docs/standard/events/snippets/how-to-handle-multiple-events-using-event-properties/csharp/EventProperties.csproj Adds C# snippet project for event-properties how-to.
docs/standard/events/index.md Updates events landing page examples and links; switches to :::code includes.
docs/standard/events/how-to-raise-and-consume-events.md Rewrites how-to with step-based structure and new snippet includes.
docs/standard/events/how-to-handle-multiple-events-using-event-properties.md Rewrites how-to with new Sensor-based sample and snippet includes.

Copy link
Copy Markdown
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM. I had one optional suggestion.

@adegeo adegeo enabled auto-merge (squash) March 30, 2026 16:18
@adegeo adegeo merged commit 84681d1 into main Mar 30, 2026
11 checks passed
@adegeo adegeo deleted the adegeo/45772/events branch March 30, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generic event+handler article links to and references ASP.NET control events

3 participants