Skip to content
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

DropTarget hint and DropHighlightAdorner background brush #489

Merged
merged 18 commits into from
Dec 5, 2024

Conversation

mangoyoga80
Copy link

@mangoyoga80 mangoyoga80 commented Mar 26, 2024

What changed?

  • Added some null checking in DefaultDropHandler.
  • Minor changes to base class DropTargetAdorner with null check and some base properties

Feature DropTargetHighlightBrush

  • Added new feature for changing the brush of highlight adorner.
  • Feature is enabled through attached property dd:DragDrop.DropTargetHighlightBrush.
  • Updated TreeView\Bound sample
    image

Feature DropHint

  • Added new feature for drop hint adorners to illustrate to the user what drop targets are available for a given drag source.
  • Added attached property dd:DragDrop.UseDropTargetHint to enable the feature
  • Added attached property dd:DragDrop.DropHintDataTemplate to override datatemplate for displaying hint
  • Made DragDrop.TryGetDropHandler and DragDrop.TryGetDropInfoBuilder internal
  • New method IDropTarget.DropHint and new properties on IDropInfo which may be breaking change
  • dd:DragDrop.UseDropTargetHint added in SettingsView to enable for all demos using these settings
  • The gif demonstrates the functionality
    DragHint-Demo
  • Updated sample Mixed\DragDropContext to use Hint and Error hints
    DragHint-DefaultBehavior

Closed issues.
#487 Added drop target hints
#488 Added the ability to change the brush of hint adorner.

@mangoyoga80 mangoyoga80 changed the title Features/drop target hint DropTarget hint and DropHighlightAdorner background brush Mar 26, 2024
@mangoyoga80 mangoyoga80 marked this pull request as ready for review March 26, 2024 15:41
@bsundsbo
Copy link
Contributor

@punker76 any chance you are able to take a look at this PR in the near future?

Happy Easter

@bsundsbo
Copy link
Contributor

@punker76 any chance you are able to take a look at this PR in the near future?

Happy Easter

@punker76 Hi. I just wanted to follow up on this PR in case you have more time these days :)

@punker76
Copy link
Owner

@bsundsbo I will take a look in next days

@punker76 punker76 added this to the 4.0.0 milestone Sep 10, 2024
@punker76
Copy link
Owner

Hi @mangoyoga80, I've finally had a look at your changes! I really like the feature. I only have one concern at the moment. Since an adorner is also used here for highlighting, the DropTargetAdorner is now always behind the HighlightAdorner. This cannot be prevented, as in WPF all adorners always get the same zIndex in the AdornerLayer.

2024-09-11_14h13_41

But I already have an idea how we can get this under control. Perhaps I will first adopt your changes and then build my idea on them. But in any case, thanks for your contribution here!!!

/cc @bsundsbo

@mangoyoga80
Copy link
Author

Hi @mangoyoga80, I've finally had a look at your changes! I really like the feature. I only have one concern at the moment. Since an adorner is also used here for highlighting, the DropTargetAdorner is now always behind the HighlightAdorner. This cannot be prevented, as in WPF all adorners always get the same zIndex in the AdornerLayer.

2024-09-11_14h13_41

But I already have an idea how we can get this under control. Perhaps I will first adopt your changes and then build my idea on them. But in any case, thanks for your contribution here!!!

/cc @bsundsbo

I've not seen that issue as I've not used similar scenarios. Great you have some ideas how to fix.
Glad you like the feature

@punker76 punker76 merged commit 6c5f2c2 into punker76:develop Dec 5, 2024
3 checks passed
@punker76
Copy link
Owner

punker76 commented Dec 5, 2024

@mangoyoga80 your changes have been merged, thanks for your contribution 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants