Migrate remaining WPF legacy snippets#2265
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates remaining legacy WPF snippet references (from ~/samples/snippets/...) into per-article ./snippets/... folders, aligning snippet usage with the repo’s current :::code pattern and unblocking follow-up deletion of the old snippets folder (Fixes #2264).
Changes:
- Updated three WPF security articles to reference local snippet files via
:::code ... source=... id=.... - Added new per-article snippet projects and source files for WPF platform security and partial-trust security examples (C# and VB).
- Added a new WPF
security-wpfsnippet set demonstratingSandboxExternalContentusage inFrameandNavigationWindow.
Reviewed changes
Copilot reviewed 31 out of 33 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet-desktop-guide/wpf/wpf-security-strategy-platform-security.md | Switches legacy snippet includes to local :::code references. |
| dotnet-desktop-guide/wpf/wpf-partial-trust-security.md | Switches legacy snippet includes to local :::code references. |
| dotnet-desktop-guide/wpf/security-wpf.md | Replaces legacy XAML snippet includes with local :::code references and adjusts surrounding text. |
| dotnet-desktop-guide/wpf/snippets/wpf-security-strategy-platform-security/vb/WPFPlatformSecuritySnippet.vbproj | Adds VB project to build the platform-security snippet set. |
| dotnet-desktop-guide/wpf/snippets/wpf-security-strategy-platform-security/vb/Page1.xaml.vb | Adds VB code-behind snippet for permission assert example. |
| dotnet-desktop-guide/wpf/snippets/wpf-security-strategy-platform-security/vb/Page1.xaml | Adds VB Page XAML used by the snippet project. |
| dotnet-desktop-guide/wpf/snippets/wpf-security-strategy-platform-security/vb/Application.xaml | Adds VB application definition for the snippet project. |
| dotnet-desktop-guide/wpf/snippets/wpf-security-strategy-platform-security/csharp/WPFPlatformSecuritySnippet.csproj | Adds C# project to build the platform-security snippet set. |
| dotnet-desktop-guide/wpf/snippets/wpf-security-strategy-platform-security/csharp/Page1.xaml.cs | Adds C# code-behind snippet for permission assert example. |
| dotnet-desktop-guide/wpf/snippets/wpf-security-strategy-platform-security/csharp/Page1.xaml | Adds C# Page XAML used by the snippet project. |
| dotnet-desktop-guide/wpf/snippets/wpf-security-strategy-platform-security/csharp/App.xaml | Adds C# application definition for the snippet project. |
| dotnet-desktop-guide/wpf/snippets/wpf-partial-trust-security/vb/WpfPartialTrustSecurity.vbproj | Adds VB project to build the partial-trust snippet set. |
| dotnet-desktop-guide/wpf/snippets/wpf-partial-trust-security/vb/Page1.xaml.vb | Adds VB page code-behind for the snippet project. |
| dotnet-desktop-guide/wpf/snippets/wpf-partial-trust-security/vb/Page1.xaml | Adds VB Page XAML used by the snippet project. |
| dotnet-desktop-guide/wpf/snippets/wpf-partial-trust-security/vb/FileHandlingGraceful.vb | Adds VB “graceful degradation” snippet implementation. |
| dotnet-desktop-guide/wpf/snippets/wpf-partial-trust-security/vb/FileHandling.vb | Adds VB permission-detection snippet implementation. |
| dotnet-desktop-guide/wpf/snippets/wpf-partial-trust-security/vb/Application.xaml | Adds VB application definition for the snippet project. |
| dotnet-desktop-guide/wpf/snippets/wpf-partial-trust-security/csharp/WpfPartialTrustSecurity.csproj | Adds C# project to build the partial-trust snippet set. |
| dotnet-desktop-guide/wpf/snippets/wpf-partial-trust-security/csharp/Page1.xaml.cs | Adds C# page code-behind for the snippet project. |
| dotnet-desktop-guide/wpf/snippets/wpf-partial-trust-security/csharp/Page1.xaml | Adds C# Page XAML used by the snippet project. |
| dotnet-desktop-guide/wpf/snippets/wpf-partial-trust-security/csharp/FileHandlingGraceful.cs | Adds C# “graceful degradation” snippet implementation. |
| dotnet-desktop-guide/wpf/snippets/wpf-partial-trust-security/csharp/FileHandling.cs | Adds C# permission-detection snippet implementation. |
| dotnet-desktop-guide/wpf/snippets/wpf-partial-trust-security/csharp/App.xaml | Adds C# application definition for the snippet project. |
| dotnet-desktop-guide/wpf/snippets/security-wpf/csharp/SecurityWpf.csproj | Adds C# WPF snippet project for security-wpf.md examples. |
| dotnet-desktop-guide/wpf/snippets/security-wpf/csharp/NavigationWindowExample.xaml | Adds XAML snippet for sandboxed NavigationWindow external content. |
| dotnet-desktop-guide/wpf/snippets/security-wpf/csharp/MainWindow.xaml.cs | Adds code-behind for the WPF snippet project main window. |
| dotnet-desktop-guide/wpf/snippets/security-wpf/csharp/MainWindow.xaml | Adds XAML snippet for sandboxed Frame external content. |
| dotnet-desktop-guide/wpf/snippets/security-wpf/csharp/ExternalContentPage.xaml | Adds external content page referenced by the sandboxing examples. |
| dotnet-desktop-guide/wpf/snippets/security-wpf/csharp/AssemblyInfo.cs | Adds WPF theme info assembly attribute. |
| dotnet-desktop-guide/wpf/snippets/security-wpf/csharp/App.xaml.cs | Adds WPF application class for the snippet project. |
| dotnet-desktop-guide/wpf/snippets/security-wpf/csharp/App.xaml | Adds WPF application definition for the snippet project. |
adegeo
enabled auto-merge (squash)
July 20, 2026 19:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Handling the issue in two steps:
Fixes #2264
Internal previews