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

Allow target adorners on non-ItemsControls #143

Merged
merged 4 commits into from
Oct 8, 2015
Merged

Conversation

emsaks
Copy link
Contributor

@emsaks emsaks commented Oct 8, 2015

Consider a listbox bound to a collection representing groups of items. You want to drag into the list or in an item. The item implements IDropTarget, and you need it to show HighlightAdorner - but that only works on a valid VisualTargetItem which is only set on ItemsControls. Added code to fallback setting VisualTargetItem = VisualTarget, and checking for target adorner on any target UIElement.

emsaks added 4 commits October 8, 2015 20:20
if VisualTarget is not ItemsControl then VisualTargetItem = VisualTarget.
Allows HighlightAdorner to be used in IDropTarget.Drag.
allow adorners on non-ItemControls (e.g. a label representing a collection, who's collection is rendered with it.)
punker76 added a commit that referenced this pull request Oct 8, 2015
Allow target adorners on non-ItemsControls
@punker76 punker76 merged commit 269b185 into punker76:master Oct 8, 2015
@punker76
Copy link
Owner

punker76 commented Oct 8, 2015

@emsaks thx

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

Successfully merging this pull request may close these issues.

2 participants