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

Selecting ViewModels programmatically: race condition and UI problems

1 Answer 52 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
pierre
Top achievements
Rank 1
pierre asked on 02 Dec 2016, 07:03 PM

Hi,

I have several ViewModels linked to my RadDiagram; and some are children of others. I'd like that, when I select one, the children view models get selected as well so I can drag all of them as a group.

The problem is that doing this breaks the dragging of the shapes on the screen, and the first one of the children shapes doesn't follow the dragging of the others. The other children drag along just fine. Am I doing something wrong?

Thanks a lot,

Pierre

private void onPropertyChanged(object sender, PropertyChangedEventArgs args){
    if (args.PropertyName.Equals(nameof(this.IsSelected)))
    {
        foreach (var child in this.ChildrenViewModels)
        {
                child.IsSelected = this.IsSelected;
        }
    }
}

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 07 Dec 2016, 03:53 PM
Hello ,

We weren't able to reproduce the behavior described in your post. That is why it will be great if you can send us isolated project from your application reproducing it so we can further test it on our side.

We are looking forward to your answer.

Regards,
Dinko
Telerik by Progress
Telerik UI for WPF is ready for Visual Studio 2017 RC! Learn more.
Tags
Diagram
Asked by
pierre
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or