Skip to content

Upgrade WPF projects to .NET 10 - #12922

Open
gewarren wants to merge 2 commits into
dotnet:mainfrom
gewarren:upgrade-wpf
Open

Upgrade WPF projects to .NET 10#12922
gewarren wants to merge 2 commits into
dotnet:mainfrom
gewarren:upgrade-wpf

Conversation

@gewarren

Copy link
Copy Markdown
Collaborator

Contributes to #12713.

Copilot AI review requested due to automatic review settings July 31, 2026 21:16
@gewarren
gewarren requested a review from a team as a code owner July 31, 2026 21:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes a set of WPF snippet projects under snippets/xaml/VS_Snippets_Wpf by converting legacy .NET Framework-style .csproj files to SDK-style projects and updating them to target .NET 10 (net10.0-windows), supporting the broader snippet modernization effort in #12713.

Changes:

  • Convert multiple WPF snippet .csproj files from legacy MSBuild format to SDK-style (Microsoft.NET.Sdk).
  • Upgrade target framework from .NET Framework 4.8 to .NET 10 (net10.0-windows) and enable WPF via <UseWPF>true</UseWPF>.
  • Simplify project item declarations (XAML items, resources, and generated resource/settings files).

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
snippets/xaml/VS_Snippets_Wpf/WrapPanel_Intro/XAML/WrapPanel_Samp.csproj SDK-style conversion; target net10.0-windows for WrapPanel sample.
snippets/xaml/VS_Snippets_Wpf/WindowIconSnippets/XAML/WindowIconSample.csproj SDK-style conversion; target net10.0-windows and keep icon resources.
snippets/xaml/VS_Snippets_Wpf/visualbrush_markup_snip/XAML/visualbrush_markup_snip.csproj SDK-style conversion; target net10.0-windows for VisualBrush sample.
snippets/xaml/VS_Snippets_Wpf/ThicknessStruct/XAML/ThicknessXAML.csproj SDK-style conversion; target net10.0-windows for Thickness sample.
snippets/xaml/VS_Snippets_Wpf/StackPanelOvw4/XAML/StackPanel_Ovw_Sample4.csproj SDK-style conversion; target net10.0-windows and keep image resource.
snippets/xaml/VS_Snippets_Wpf/Slider/xaml/slider_xaml.csproj SDK-style conversion; target net10.0-windows with explicit XAML/code/resource items.
snippets/xaml/VS_Snippets_Wpf/ScrollViewer/XAML/ScrollViewer_wcp.csproj SDK-style conversion; target net10.0-windows for ScrollViewer sample.
snippets/xaml/VS_Snippets_Wpf/PageShowsNavigationUISnippets/XAML/XAML.csproj SDK-style conversion; target net10.0-windows and preserve resx/settings generation wiring.
snippets/xaml/VS_Snippets_Wpf/PageKeepAliveSnippets/XAML/XAML.csproj SDK-style conversion; target net10.0-windows and preserve resx/settings generation wiring.
snippets/xaml/VS_Snippets_Wpf/MPALayoutVerticalAlignment/XAML/MPA_Layout_VerticalAlignment.csproj SDK-style conversion; target net10.0-windows for MPA layout sample.
snippets/xaml/VS_Snippets_Wpf/MarginPaddingAlignmentSample/XAML/Margin_Padding_Alignment_Sample.csproj SDK-style conversion; target net10.0-windows for margin/padding/alignment sample.
snippets/xaml/VS_Snippets_Wpf/LayoutTransform/XAML/LayoutTransform.csproj SDK-style conversion; target net10.0-windows for LayoutTransform sample.
snippets/xaml/VS_Snippets_Wpf/keyframes_snip/XAML/keyframes_markup.csproj SDK-style conversion; target net10.0-windows for keyframes sample, keeping pages/resources.
snippets/xaml/VS_Snippets_Wpf/Grid/XAML/Grid_Ovw_sample.csproj SDK-style conversion; target net10.0-windows for Grid overview sample.
snippets/xaml/VS_Snippets_Wpf/GradientBrushExamples_snip/XAML/GradientBrushExamples.csproj SDK-style conversion; target net10.0-windows for gradient brush examples.
snippets/xaml/VS_Snippets_Wpf/GeometriesMiscSnippets_snip/XAML/GeometriesMiscSnippets.csproj SDK-style conversion; target net10.0-windows for geometries misc snippets.
snippets/xaml/VS_Snippets_Wpf/FrameNavigationUIVisibilitySnippets/XAML/XAML.csproj SDK-style conversion; target net10.0-windows and preserve resource/settings file wiring.
snippets/xaml/VS_Snippets_Wpf/DrawingMiscSnippets_snip/XAML/misc_snippets.csproj SDK-style conversion; target net10.0-windows for drawing misc snippets.
snippets/xaml/VS_Snippets_Wpf/DockPanelOvwSample/XAML/DockPanel_Ovw_sample.csproj SDK-style conversion; target net10.0-windows for DockPanel overview sample.
snippets/xaml/VS_Snippets_Wpf/DeferredScrolling/xaml/deferredscrolling.csproj SDK-style conversion; target net10.0-windows with explicit XAML/code/resource items.
snippets/xaml/VS_Snippets_Wpf/datepickersnippets/xaml/datepickersnippets.csproj SDK-style conversion; target net10.0-windows for DatePicker snippets.
snippets/xaml/VS_Snippets_Wpf/DataTemplatingIntro/xaml/datatemplatingsample.csproj SDK-style conversion; target net10.0-windows for DataTemplating intro sample.
snippets/xaml/VS_Snippets_Wpf/CanvasZ-Order/XAML/Canvas_Z-Order.csproj SDK-style conversion; target net10.0-windows and set RootNamespace.
snippets/xaml/VS_Snippets_Wpf/CanvasOvwSample/XAML/Canvas_Ovw_Sample.csproj SDK-style conversion; target net10.0-windows for Canvas overview sample.
snippets/xaml/VS_Snippets_Wpf/calendarsnippets/xaml/calendarsnippets_xaml.csproj SDK-style conversion; target net10.0-windows for Calendar snippets.
snippets/xaml/VS_Snippets_Wpf/BrushOverviewExamples_snip/XAML/BrushOverviewExample.csproj SDK-style conversion; target net10.0-windows for brush overview examples.
snippets/xaml/VS_Snippets_Wpf/BrushesIntroduction_snip/XAML/BrushesIntroduction.csproj SDK-style conversion; target net10.0-windows for Brushes introduction sample.
snippets/xaml/VS_Snippets_Wpf/Basic3D/XAML/BlankSample.csproj SDK-style conversion; target net10.0-windows for Basic3D blank sample.
snippets/xaml/VS_Snippets_Wpf/ApplicationMainWindowSnippets/XAML/XAML.csproj SDK-style conversion; target net10.0-windows and preserve resource/settings generation wiring.
snippets/xaml/VS_Snippets_Wpf/AnimatePropertyStoryboards/XAML/AnimateProperty_Storyboards_markup.csproj SDK-style conversion; target net10.0-windows for storyboard animation sample.
Suppressed comments (1)

snippets/xaml/VS_Snippets_Wpf/Basic3D/XAML/BlankSample.csproj:22

  • BlankSample.csproj contains two identical <Generator>MSBuild:Compile</Generator> elements under the Window1.xaml Page item. Keep a single generator entry.
    <Page Include="Window1.xaml">
      <Generator>MSBuild:Compile</Generator>
      <Generator>MSBuild:Compile</Generator>
    </Page>

Comment thread snippets/xaml/VS_Snippets_Wpf/Basic3D/XAML/BlankSample.csproj
Removed duplicate Generator entries for ApplicationDefinition and Page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants