winforms icon indicating copy to clipboard operation
winforms copied to clipboard

Add shortCut copy paste In DemoConsole

Open Epica3055 opened this issue 6 months ago • 2 comments

Fixes #10466

Root cause

Copy and paste now works in DemoConsole in netframework481 but not in net10. that's because the serializer here does not work in net10, it was deprecated long time ago.

https://github.com/dotnet/winforms/blob/b0b0e101cb69db4b70f7e3559e30406b210b1f1d/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/CommandSet.cs#L1409C1-L1415C74

Proposed changes

  • We don't serialize CodeDomSerializationStore anymore. Copy the selectionComponents when CopyCommand is triggered.

Screenshots

Before

N/A

After

PR_13644_01

Microsoft Reviewers: Open in CodeFlow

Epica3055 avatar Jun 24 '25 07:06 Epica3055

Codecov Report

:x: Patch coverage is 6.66667% with 14 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 76.60777%. Comparing base (1c091ca) to head (c798cbc). :warning: Report is 104 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #13644         +/-   ##
===================================================
+ Coverage   76.57432%   76.60777%   +0.03345%     
===================================================
  Files           3252        3253          +1     
  Lines         640942      640965         +23     
  Branches       47437       47432          -5     
===================================================
+ Hits          490797      491029        +232     
+ Misses        146602      146280        -322     
- Partials        3543        3656        +113     
Flag Coverage Δ
Debug 76.60777% <6.66667%> (+0.03345%) :arrow_up:
integration 18.97179% <6.66667%> (+0.49589%) :arrow_up:
production 51.06257% <6.66667%> (+0.06550%) :arrow_up:
test 97.41186% <ø> (+0.00048%) :arrow_up:
unit 48.44734% <0.00000%> (+0.03625%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Jun 24 '25 09:06 codecov[bot]

Please add Root Cause in the Description

LeafShi1 avatar Jun 26 '25 01:06 LeafShi1