This is a migrated thread and some comments may be shown as answers.

DragDropManager.AllowDrag and AllowCapturedDrag are out of sync when bound to an attached property

3 Answers 199 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Alvin
Top achievements
Rank 1
Alvin asked on 10 Apr 2017, 08:34 PM

Hi Guys,

I am using the 2016 UI for WPF. I am using the DragDropManager.AllowDrag, DragDropManager.AllowCapturedDrag properties. They are bound to one of my attached property.

Checkbox.IsChecked <=> two way binding to my attachd property IsAvailable 

DragDropManager.AllowDrag & AllowCapturedDrag => bound to IsAvailable.

On doing the following steps, the bug is reproduced.

1. Click on check box to "Check" the checkbox

{EXPECTED} IsAvailable = true, AllowDrop = true, AllowCapturedDrop = true

{ACTUAL} IsAvailable = true, AllowDrop = true (value source = local) , AllowCapturedDrop = true (value source = Parent Template)

2. Click on check box to "Uncheck" the checkbox. 

{EXPECTED} IsAvailable = false, AllowDrop = false, AllowCapturedDrop = false

{ACTUAL}  IsAvailable = false, AllowDrop = ***true*** , AllowCapturedDrop =false

Note that I have looked in my code to make sure that none of my code is setting the AllowDrag directly or indirectly.

However, when I use the now obsolete RadDragDropManager.AllowDrag instead of the DragDropManager.AllowDrag/AllowCapturedDrag, everything works as expected.

I would like to know if you know of this bug and have fixed it. It is replicating with latest version which I have downloaded as a trial.

Thanks

3 Answers, 1 is accepted

Sort by
0
Polya
Telerik team
answered on 12 Apr 2017, 11:07 AM
Hi Alvin,

With our Q2 2016 release of Telerik UI for WPF everything seems to be working as expected. You can give it a try or get our latest version to resolve this issue.

Regards,
Polya
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Alvin
Top achievements
Rank 1
answered on 17 Apr 2017, 01:13 PM

Hi Polya,

I do get the same issue with the latest UI for WPF (trial version) as well. Please let me know if there is any info that might help rule out some noise. 

Thanks!

0
Nasko
Telerik team
answered on 19 Apr 2017, 07:20 AM
Hi Alvin,

We have tried to reproduce the observed by you issue again, but it seems everything is working as expected for us - when the CheckBox is checked the values of the attached properties become True and when it is unchecked they become false. Attached you could find a video that demonstrates the behavior observed on our side.

Also we are a little bit confused because in your initial post as an expected result you are mentioning the AllowDrop property - please, confirm that you are binding the AllowDrag and AllowCaptureDrag properties.

A sample project that we have used for our investigation is also attached. Please, try to modify it in order to reproduce the observed by you issue and send it back to us - thus we could be able to provide you with a prompt solution.

Hope this helps.

Regards,
Nasko
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
DragAndDrop
Asked by
Alvin
Top achievements
Rank 1
Answers by
Polya
Telerik team
Alvin
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or