docs-desktop icon indicating copy to clipboard operation
docs-desktop copied to clipboard

Add warning that DragEnter does not work unless Canvas Background is set

Open techfan101 opened this issue 3 years ago • 0 comments

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 the AllowDrop property, it is also necessary to set the Background property. Otherwise, the Canvas is not recognized as a valid drop target, the "not allowed" cursor is displayed, and the DragEnter and Drop 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.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

techfan101 avatar Aug 02 '22 13:08 techfan101