Enable support for 3rd party controls. #403
Merged
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.
What changed?
IDragInfoBuilder
enables the specification of aIDragInfo
factory to handle unsupported 3rd party controls.User can opt-in into this interface by adding the right binding in XAML:
dd:DragDrop.DragInfoBuilder="{Binding}"
Added
IDragInfoBuilder
interface andDragInfoBuilder
dependency property.When
IDragInfoBuilder
is specified, the code calls the appropriate member from it to create the DragInfo object.If this call returns null, it uses the regular DragInfo construction code. Same thing happens if when IDragInfoBuilder is NOT specified.
IDragInfoBuilder.CreateDragInfo
is where custom code can be specified to handle the correct creation of DragInfo 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.
Closes #36