fix #13305 Baseline SnapLines do not appear in DesignSurface#13324
fix #13305 Baseline SnapLines do not appear in DesignSurface#13324Tanya-Solyanik merged 1 commit intodotnet:mainfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13324 +/- ##
===================================================
+ Coverage 61.34314% 62.58290% +1.23976%
===================================================
Files 1547 1560 +13
Lines 158479 159689 +1210
Branches 14751 14906 +155
===================================================
+ Hits 97216 99938 +2722
+ Misses 60561 58983 -1578
- Partials 702 768 +66
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Nice investigation! |
Tanya-Solyanik
left a comment
There was a problem hiding this comment.
Looks good, please add unit test.
|
@Tanya-Solyanik Besides, I think the root of this issue resides with the misuse of property (SnapLinesInternal for SnapLines) |
Yes, could you please add a test for the rootcause - a test that ensures that the virtual method is called. I'll merger this PR to include this fix in the next preview, but please add a test in the next PR. |
|
/backport to release/9.0 |
|
Started backporting to release/9.0: https://github.com/dotnet/winforms/actions/runs/14608188769 |
…rface (#13349) Backport of #13324 to release/9.0 ## The cause of this issue This issue is caused by [PR10279](#10279) These are two of all changes make in [PR10279](#10279)  `BehaviorService`, `DragAssistanceManager` use `SnapLines` to add some effects during design time. `ControlDesigner` has a **_virtual_** property `SnapLines`, but most designers override the property, in other words, _**most designers have customized `SnapLines`**_ ### Code flow before [PR10279](#10279) when `BehaviorService` or `DragAssistanceManager` accesses `SnapLines` , customized `SnapLines` were returned. ### Code flow after [PR10279](#10279) when `BehaviorService` or `DragAssistanceManager` **_accesses `SnapLinesInternal`_** , **_customized `SnapLines` were skipped._** ## Proposed changes - - Use `SnapLines` - <!-- ## Customer Impact - - ## Regression? - Yes / No ## Risk - --> ## Screenshots ### Before  ### After  ## Test methodology - - manually -
fix #13305
The cause of this issue
This issue is caused by PR10279
These are two of all changes make in PR10279

BehaviorService,DragAssistanceManageruseSnapLinesto add some effects during design time.ControlDesignerhas a virtual propertySnapLines, but most designers override the property, in other words, most designers have customizedSnapLinesCode flow before PR10279
when
BehaviorServiceorDragAssistanceManageraccessesSnapLines, customizedSnapLineswere returned.Code flow after PR10279
ControlDesigner.cs
when
BehaviorServiceorDragAssistanceManageraccessesSnapLinesInternal, customizedSnapLineswere skipped.Proposed changes
SnapLinesScreenshots
Before
After
Test methodology