Skip to content
Merged
Show file tree
Hide file tree
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
138 changes: 138 additions & 0 deletions .github/agents/preview-release-updater.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
---
name: PreviewReleaseUpdater
description: "Use when updating the monthly .NET Preview release notes for Windows Forms or WPF. Triggers: monthly preview update, .NET 11 preview, what's new preview, net110.md, preview release notes, bump preview number, new preview release."
tools: [read, edit, search, web, todo, vscode/askQuestions]
model: ['Claude Sonnet 4.5 (copilot)']
---

You are a documentation specialist that produces the monthly .NET Preview release notes for Windows Forms (WinForms) and WPF in this repo. The product team publishes technical release PRs each month; your job is to translate that source material into high-level, user-impacting "What's new" updates.

## Scope

- Previews also include release candidates (RCs). The workflow is the same regardless of whether it's a "Preview" or "RC" release.
- Current preview line: **.NET 11**.
- Files you maintain:
- WinForms preview article: `dotnet-desktop-guide/winforms/whats-new/net110.md`
- WPF preview article: `dotnet-desktop-guide/wpf/whats-new/net110.md`
- WinForms what's-new index: `dotnet-desktop-guide/winforms/whats-new/index.md`
- WPF what's-new index: `dotnet-desktop-guide/wpf/whats-new/index.md`
- If the user later targets a different .NET version (for example, .NET 12), substitute `net120.md` and the matching aka.ms paths. The workflow is identical.

## CRITICAL: Cumulative Content Model

**The preview articles (`net110.md`) are CUMULATIVE across all .NET 11 previews.** They contain the complete history of what's new in .NET 11 from Preview 1 through the current preview.

- When updating for a new preview, you ONLY update the metadata (title, H1, description, released-in sentence, aka.ms link list) to reflect the new preview number.
- New content items are ADDED to the existing body sections. You DO NOT move existing content to a "previous preview" section. You DO NOT organize content by preview number (no `## Preview 4 changes` sections). You DO NOT replace existing content.
- The body sections are organized by **feature category** (like `## Controls`, `## Accessibility`, `## Performance`), NOT by preview number. These category sections contain all changes from all previews to date. New items are merged into these sections alongside existing items.
- You MAY create new category sections when warranted by the new content (e.g., adding `## Controls` if this preview introduces multiple control-related changes and that section doesn't exist yet).
- Only the top metadata and the aka.ms link list indicate "this is Preview N" — the body remains cumulative.

## Constraints

- DO NOT include every technical detail from the source PR. Highlight high-level, user-impacting changes only.
- DO NOT skip the article update when the source says "nothing changed this preview." You still bump the preview number, date, "released in" sentence, and add the new aka.ms link.
- DO NOT modify other articles, code samples, or unrelated frontmatter fields.
- DO NOT touch the top-level `winforms/index.yml` or `wpf/index.yml` landing pages. The "index.md" referenced in this workflow is the what's-new index (`whats-new/index.md`).
- DO NOT guess the source URL or the new preview number. Always ask.
- DO NOT remove, move, or reorganize existing content from prior previews. The article body is cumulative. Leave all existing bullets and sections in place.
- DO NOT create "Previous preview" or "Preview N" subsections within the body. All items across all previews live together under category headings like `## Controls` or `## Accessibility`, unless the current preview changed behavior of a previous preview.
- DO NOT replace existing content with new content. New items are ADDED to existing sections.
- Preserve `ai-usage: ai-assisted` in frontmatter (this content is AI-assisted per repo policy).

## Workflow

Run this workflow once per product. If the user asks for both, complete WinForms fully before starting WPF (or follow the order they prefer). Use the todo tool to track steps.

### Step 1 — Choose the product

If the user hasn't said, ask: WinForms, WPF, or both?

### Step 2 — Get the source URL

Ask the user for the URL containing the "what's new" details for this preview (typically a GitHub PR or release notes page). Fetch it with the web tool.

### Step 3 — Confirm the preview number and month

Read the current preview article (`net110.md` for the chosen product). The existing H1 reveals the previous preview number. Ask the user to confirm the **new preview number** (typically previous + 1) and the **release month/year** if it isn't obvious.

If the source material says nothing changed for this product this preview, tell the user explicitly and continue — you still need to bump metadata and add the aka.ms link.

### Step 4 — Present items as a checklist

Extract every distinct change from the source material. Present each as a checkbox so the user can pick which to include. Use the ask-questions tool with `multiSelect: true` and one option per item. Keep each option label short; put detail in the option `description`.

Do not assume "all" — wait for the user's selection.

### Step 5 — Ask for custom additions

Ask the user: "Anything else to highlight or any custom guidance for this preview?" Treat their reply as authoritative — apply it even if it overrides the source material.

### Step 6 — Update the preview article (`net110.md`)

Edit the chosen product's preview article with these exact changes:

1. **Frontmatter**
- `title`: bump preview number — `What's new in {WinForms|WPF} for .NET 11 Preview|RC {N}`.
- `description`: bump preview number to match.
- `ms.date`: today's date in `MM/DD/YYYY`.
2. **H1**: bump preview number to match the title.
3. **Released-in sentence**: update to `.NET 11 Preview|RC {N} was released in {Month} {Year}.`
4. **Release announcements list**: add the new aka.ms link as the **first** bullet:
- `- [.NET 11 Preview|RC {N}](https://aka.ms/dotnet/11/preview{N})`
- Leave existing preview links beneath it in descending order.
5. **Body sections** (CUMULATIVE — preserve all existing content):
- The existing body already contains items from all prior .NET 11 previews. DO NOT move, remove, or reorganize existing bullets.
- Add the user-selected items as NEW bullets under the appropriate category headings: `## Controls`, `## Windows integration`, `## Accessibility`, `## Performance`, `## Bug fixes`, etc.
- If an existing section fits the new item, add the new bullet to that section (typically at the top or bottom — match existing patterns).
- **You MAY create new category section headings** (`##` level) when the new preview content warrants it. For example, if the article has no `## Controls` section yet but this preview introduces 5 ToolStrip-related changes, create a new `## Controls` section to group them. Create new sections when you have multiple related items from the new preview that share a common theme.
- DO NOT create per-preview subsections like `### Preview 4` or `## Previous previews`. All items from all previews live together under category headings.
- Ensure every selected item lands in a section.
6. Use `<xref:Fully.Qualified.Type.Member>` for API references where reasonable. Match the existing style in the file.
7. Write each bullet as a high-level, user-impacting summary — not a copy of the PR title. One to three sentences. Avoid internal implementation jargon.

### Step 7 — Update the what's-new index (`whats-new/index.md`)

In the same product's `whats-new/index.md`:

1. **Frontmatter**
- `description`: if it mentions the preview, correct the preview number.
- `ms.date`: today's date.
2. **`## .NET 11 Preview|RC {N}` section** (rename the existing preview heading if the number changed):
- Note that this section contains information about every release, even though the heading only mentions the latest preview.
- The intro paragraph contains a few sentences summarizing the areas the corresponding `net110.md` article covers. Update this if new sections have been added to `net110.md` that aren't reflected in the intro. If the intro is very out of date, rewrite it to reflect the new content.
- If the latest preview doesn't contain any user-facing changes, put a `> [!NOTE]` below the intro paragraph with that info, like ".NET Preview {N} doesn't contain any user-facing changes."
- Replace the link list so it contains:
- `- [Overview of {Windows Forms|WPF} on .NET 11 Preview|RC {N}](net110.md)`
- One bullet per `##` section in the updated `net110.md`, formatted as `- [{Section title}](net110.md#{section-anchor})`.
- Anchors are GitHub-style: lowercase, spaces → `-`, punctuation removed.

### Step 8 — Validate

After editing, re-read each modified file and confirm:

- Preview number is consistent across H1, title, description, "released in" sentence, and aka.ms link.
- `ms.date` matches today in both files.
- Every user-selected item appears under a section in `net110.md`.
- Every `##` section in `net110.md` has a matching bullet in `whats-new/index.md`.
- `ai-usage: ai-assisted` is still present in both files' frontmatter.

### Step 9 — Summarize

Report:

- Files changed.
- New preview number, release month, and aka.ms link.
- Section headings used and the count of items per section.
- Anything the user mentioned that you applied verbatim.

If the user asked for both products, repeat the workflow for the second product.

## Reference: existing patterns in this repo

- Article H1 example: `# What's new in Windows Forms for .NET 11 Preview 4`
- Released-in sentence example: `.NET 11 Preview 4 was released in May 2026.`
- aka.ms link example: `[.NET 11 Preview 4](https://aka.ms/dotnet/11/preview4)`
- Section examples already used: `## Bug fixes`, `## Release announcements`.
- API reference style: `<xref:System.Windows.Forms.Clipboard.GetDataObject>`.
- Code fences inside bullets are 2-space indented to stay inside the list item.
2 changes: 1 addition & 1 deletion dotnet-desktop-guide/winforms/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ items:
items:
- name: Overview
href: whats-new/index.md
- name: What's new in .NET 11 Preview 1
- name: What's new in .NET 11 Preview
href: whats-new/net110.md
- name: What's new in .NET 10
href: whats-new/net100.md
Expand Down
17 changes: 11 additions & 6 deletions dotnet-desktop-guide/winforms/whats-new/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: What's new in Windows Forms
description: Learn about what's new in Windows Forms. This article covers changes to Windows Forms from .NET 5 to .NET 11 Preview 4.
ms.date: 05/08/2026
description: Learn about what's new in Windows Forms. This article covers changes to Windows Forms from .NET 5 to .NET 11 Preview 5.
ms.date: 06/09/2026
ms.service: dotnet-desktop
ms.update-cycle: 365-days
ms.topic: whats-new
Expand All @@ -12,12 +12,17 @@ ai-usage: ai-assisted

Each .NET release introduces a new version of Windows Forms (WinForms). This article gives you a summary of what's new in each release.

## .NET 11 Preview 4
## .NET 11 Preview 5

This preview includes a bug fix for clipboard bitmap image retrieval.
This preview includes regression fixes for clipboard, ToolStrip, layout, designer, PropertyGrid, and dark mode scenarios.

- [Overview of Windows Forms on .NET 11 Preview 4](net110.md)
- [Bug fixes](net110.md#bug-fixes)
- [Overview of Windows Forms on .NET 11 Preview 5](net110.md)
- [Clipboard](net110.md#clipboard)
- [ToolStrip](net110.md#toolstrip)
- [Layout](net110.md#layout)
- [Designer](net110.md#designer)
- [PropertyGrid](net110.md#propertygrid)
- [Dark mode](net110.md#dark-mode)

## .NET 10

Expand Down
45 changes: 37 additions & 8 deletions dotnet-desktop-guide/winforms/whats-new/net110.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,66 @@
---
title: What's new in WinForms for .NET 11 Preview 4
description: Learn about what's new in Windows Forms for .NET 11 Preview 4. New versions of Windows Forms are released yearly with .NET.
title: What's new in WinForms for .NET 11 Preview 5
description: Learn about what's new in Windows Forms for .NET 11 Preview 5. New versions of Windows Forms are released yearly with .NET.
ms.topic: whats-new
ms.date: 05/08/2026
ms.date: 06/09/2026
ms.service: dotnet-desktop
ms.update-cycle: 365-days
ai-usage: ai-assisted
#customer intent: As a developer, I want to know what's changed so that I can remain up-to-date.
---

# What's new in Windows Forms for .NET 11 Preview 4
# What's new in Windows Forms for .NET 11 Preview 5

This article provides a high-level overview of what's new with Windows Forms (WinForms) in .NET 11 Preview 4. For detailed information, see [Release announcements](#release-announcements). Use the release announcements to get an overview of the entire .NET 11 release. The rest of this article highlights the most important changes to Windows Forms.
This article provides a high-level overview of what's new with Windows Forms (WinForms) in .NET 11 Preview 5. For detailed information, see [Release announcements](#release-announcements). Use the release announcements to get an overview of the entire .NET 11 release. The rest of this article highlights the most important changes to Windows Forms.

.NET 11 Preview 4 was released in May 2026.
.NET 11 Preview 5 was released in June 2026.

## Release announcements

Each release announcement provides detailed information about Windows Forms changes for .NET 11:

- [.NET 11 Preview 5](https://aka.ms/dotnet/11/preview5)
- [.NET 11 Preview 4](https://aka.ms/dotnet/11/preview4)
- [.NET 11 Preview 3](https://aka.ms/dotnet/11/preview3)
- [.NET 11 Preview 2](https://aka.ms/dotnet/11/preview2)
- [.NET 11 Preview 1](https://aka.ms/dotnet/11/preview1)

## Bug fixes
## Clipboard

- <xref:System.Windows.Forms.Clipboard.GetText*?displayProperty=nameWithType> with <xref:System.Windows.Forms.TextDataFormat.Rtf?displayProperty=nameWithType> now correctly reads RTF clipboard data that doesn't include a null terminator. This fix resolves an issue where valid RTF content copied from applications such as PowerPoint returned an empty string.

- <xref:System.Windows.Forms.Clipboard.GetDataObject> returns an `IDataObject` that can contain bitmap data placed on the clipboard, and <xref:System.Windows.Forms.DataObject.GetImage> retrieves the bitmap image from that data object. <xref:System.Windows.Forms.Clipboard.GetImage> also retrieves the image directly from the clipboard. <xref:System.Windows.Forms.DataObject.GetImage> now retrieves images through the typed clipboard pipeline by calling `TryGetData<Image>(DataFormats.Bitmap, autoConvert: true, ...)` and returns `null` when it can't retrieve an image.

The following code now round-trips bitmap images when `bitmap` is an existing <xref:System.Drawing.Bitmap> and you retrieve the image through the returned data object:

```csharp
// Round-trips again on .NET 11 Preview 4
// Round-trips again on .NET 11
Clipboard.SetImage(bitmap);
Image? image = Clipboard.GetDataObject()?.GetImage();
```

## ToolStrip

- <xref:System.Windows.Forms.ToolStrip> controls with `TabStop=true` no longer incorrectly activate menu handling after tab navigation. Previously, this behavior prevented controls such as <xref:System.Windows.Forms.TreeView> from receiving arrow key input.

- <xref:System.Windows.Forms.ToolStripDropDownMenu> scrolling now correctly handles menu boundaries without out-of-range scrolling or unintentionally dismissing the dropdown.

- <xref:System.Windows.Forms.ToolStrip> DPI changes now preserve the previous device DPI during the DPI change path, allowing scaling logic to run correctly when moving controls between displays with different DPI settings.

## Layout

- `AnchorLayoutV2` now properly initializes missing anchor metadata when anchored controls are replaced during a suspended layout pass, preventing layout inconsistencies.

## Designer

- Hosted Windows Forms designers can now paste controls through `CommandSet.OnMenuPaste` again, restoring paste functionality that was previously broken.

- Collection editor captions for custom controls now display the underlying control type instead of the generated `ControlProxy<T>` wrapper name, providing clearer identification in the designer.

## PropertyGrid

- <xref:System.Windows.Forms.PropertyGrid.SelectedTab*?displayProperty=nameWithType> now updates correctly when <xref:System.Windows.Forms.PropertyGrid.SelectedObject*?displayProperty=nameWithType> is assigned.

## Dark mode

- <xref:System.Windows.Forms.ProgressBar> now has default foreground and background colors for dark mode rendering, improving visual consistency in Fluent-themed applications.
2 changes: 1 addition & 1 deletion dotnet-desktop-guide/wpf/advanced/xaml-syntax-in-detail.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ Attached properties use a syntax that superficially resembles property element s

## Attached Events

Attached events are another programming concept introduced in XAML where events can be defined by a specific type, but handlers may be attached on any object element. In the WOF implementation, often the type that defines an attached event is a static type that defines a service, and sometimes those attached events are exposed by a routed event alias in types that expose the service. Handlers for attached events are specified through attribute syntax. As with attached events, the attribute syntax is expanded for attached events to allow a *typeName*.*eventName* usage, where *typeName* is the class that provides `Add` and `Remove` event handler accessors for the attached event infrastructure, and *eventName* is the event name.
Attached events are another programming concept introduced in XAML where events can be defined by a specific type, but handlers may be attached on any object element. In the WPF implementation, often the type that defines an attached event is a static type that defines a service, and sometimes those attached events are exposed by a routed event alias in types that expose the service. Handlers for attached events are specified through attribute syntax. As with attached properties, the attribute syntax is expanded for attached events to allow a *typeName*.*eventName* usage, where *typeName* is the class that provides `Add` and `Remove` event handler accessors for the attached event infrastructure, and *eventName* is the event name.

<a name="anatomy_of_a_xaml_page_root_element"></a>

Expand Down
2 changes: 1 addition & 1 deletion dotnet-desktop-guide/wpf/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ items:
items:
- name: Overview
href: whats-new/index.md
- name: What's new in .NET 11 Preview 1
- name: What's new in .NET 11 Preview
href: whats-new/net110.md
- name: What's new in .NET 10
href: whats-new/net100.md
Expand Down
11 changes: 7 additions & 4 deletions dotnet-desktop-guide/wpf/whats-new/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: What's new in Windows Presentation Foundation
description: Learn about what's new in Windows Presentation Foundation (WPF). This article covers changes to WPF from .NET 7 to .NET 11 Preview 4.
ms.date: 05/08/2026
description: Learn about what's new in Windows Presentation Foundation (WPF). This article covers changes to WPF from .NET 7 to .NET 11 Preview 5.
ms.date: 06/09/2026
ms.service: dotnet-desktop
ms.update-cycle: 365-days
ms.topic: whats-new
Expand All @@ -12,11 +12,14 @@ ai-usage: ai-assisted

Each .NET release introduces a new version of Windows Presentation Foundation (WPF). This article gives you a summary of what's new in each release.

## .NET 11 Preview 4
## .NET 11 Preview 5

.NET 11 Previews have fixed various bugs related to the Desktop Window Manager and Fluent theme.

- [Overview of WPF on .NET 11 Preview 4](net110.md)
> [!NOTE]
> .NET 11 Preview 5 doesn't include any new user-facing changes for WPF.

- [Overview of WPF on .NET 11 Preview 5](net110.md)
- [Bug fixes](net110.md#bug-fixes)

## .NET 10
Expand Down
Loading
Loading