Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[release/9.0] fix #13071 Changing properties with RefreshProperties.All does not requery the property list in the PropertyGrid in .net 9 (worked in .net 8) #13356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2025

Conversation

Epica3055
Copy link
Member

@Epica3055 Epica3055 commented Apr 23, 2025

Backport of #13295 to release/9.0

Fixes #13071

Proposed changes

  • revert PR#12431 , use another approach to fix Issue#12440
  • Introduce EditMouseDown flag in PropertyGridView.flag. This flag is on when the TextBox in the PropertyGrid.GridEntry is focused and is off when editing is done.
  • The cause of Issue#12440 is that after editing is done, GridEntryAccessibleObject will raise AutomationFocusChangedEvent

GridEntry.GridEntryAccessibleObject.cs

        ...
        internal override void SetFocus()
        {
            if (PropertyGridView is null || !PropertyGridView.IsHandleCreated)
            {
                return;
            }

            base.SetFocus();

            RaiseAutomationEvent(UIA_EVENT_ID.UIA_AutomationFocusChangedEventId);
        }

So in order to not let TextBox loose rectangle, add conditions to that event to exclude two cases:

  1. when InPropertySet is on
  2. when EditMouseDown is on

Regression?

  • Yes

Screenshots

Before

GetProperties method didn't get invoked described in #13071

After

Issues13071.01.mp4
Issues13071.02.mp4

Test methodology

  • manually

…ties.All does not requery the property list in the PropertyGrid in .net 9 (worked in .net 8)
@Epica3055 Epica3055 requested a review from a team as a code owner April 23, 2025 08:13
@LeafShi1
Copy link
Member

Please update the description following by the template

Proposed changes
.
Customer Impact
·
Regression?
· Yes, introduced in xxx
Risk
.

Copy link

codecov bot commented Apr 23, 2025

Codecov Report

Attention: Patch coverage is 45.76271% with 32 lines in your changes missing coverage. Please review.

Project coverage is 74.83961%. Comparing base (61ec31a) to head (906f2b7).
Report is 13 commits behind head on release/9.0.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           release/9.0      #13356         +/-   ##
=====================================================
+ Coverage     74.83837%   74.83961%   +0.00123%     
=====================================================
  Files             3022        3022                 
  Lines           630464      630499         +35     
  Branches         46801       46804          +3     
=====================================================
+ Hits            471829      471863         +34     
- Misses          155246      155250          +4     
+ Partials          3389        3386          -3     
Flag Coverage Δ
Debug 74.83961% <45.76271%> (+0.00123%) ⬆️
integration 18.02410% <11.42857%> (+0.01304%) ⬆️
production 47.87238% <14.28571%> (+0.00236%) ⬆️
test 96.99969% <91.66667%> (-0.00037%) ⬇️
unit 44.90229% <2.85714%> (+0.02042%) ⬆️

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

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

@Tanya-Solyanik Tanya-Solyanik added servicing-consider .NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria 🚫 * NO-MERGE * The PR is not ready for merge yet (see discussion for detailed reasons) servicing-approved .NET Shiproom approved the PR for merge and removed servicing-consider .NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria labels Apr 24, 2025
@Tanya-Solyanik Tanya-Solyanik added this to the 9.0.6 milestone Apr 24, 2025
@Tanya-Solyanik Tanya-Solyanik merged commit 7d96dbd into dotnet:release/9.0 May 8, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚫 * NO-MERGE * The PR is not ready for merge yet (see discussion for detailed reasons) servicing-approved .NET Shiproom approved the PR for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants