Add warning that DragEnter does not work unless Canvas Background is set #1490
Labels
doc-bug
Problem with the content; needs to be fixed [org][type][category]
dotnet-framework/svc
okr-health
Content-health KR: Concerns article defects/freshness or build warnings.
okr-quality
Pri3
Low priority
📌 seQUESTered
Label to indicate an item has been imported.
wpf/subsvc
Type of issue
Missing information
Description
For the most part, this page was very helpful and clearly written. However, there is one "gotcha" that can cause a huge headache for your readers.
It occurs with controls like the
Canvas
control. In addition to setting theAllowDrop
property, it is also necessary to set theBackground
property. Otherwise, theCanvas
is not recognized as a valid drop target, the "not allowed" cursor is displayed, and theDragEnter
andDrop
events never fire.Adding a simple warning about the
Background
property could save developers a lot of time.I recently spent an afternoon re-discovering this entirely non-obvious requirement. It would be great if you could help other developers avoid this time waste :) Thank you.
Page URL
https://learn.microsoft.com/en-us/dotnet/desktop/wpf/advanced/drag-and-drop-overview?view=netframeworkdesktop-4.8
Content source URL
https://github.com/dotnet/docs-desktop/blob/main/dotnet-desktop-guide/framework/wpf/advanced/drag-and-drop-overview.md
Document Version Independent Id
ca183356-078d-1538-1aa4-d3d7d604231b
Article author
@adegeo
Associated WorkItem - 341102
The text was updated successfully, but these errors were encountered: