Enable DropInfo creation for 3rd party controls #411
Merged
+90
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IDropInfoBuilder
enables the specification of aIDropInfo
factory to handle unsupported 3rd party controls.User can opt-in into this interface by adding the right binding in XAML:
dd:DragDrop.DropInfoBuilder="{Binding}"
Added
IDropInfoBuilder
interface andDropInfoBuilder
dependency property.When
IDropInfoBuilder
is specified, the code calls the appropriate member from it to create the DrapInfo object.If this call returns null, it uses the regular DropInfo construction code. Same thing happens if when IDropInfoBuilder is NOT specified.
IDropInfoBuilder.CreateDropInfo
is where custom code can be specified to handle the correct creation of DropInfo objects for custom controls.For instance, I need to support Telerik's RadTreeListView but the same mechanism can be applied to any other 3rd or custom control that is not supported by default.