Selecting ViewModels programmatically: race condition and UI problems

2 posts, 0 answers
  1. pierre
    pierre avatar
    1 posts
    Member since:
    Dec 2016

    Posted 02 Dec 2016 Link to this post

    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;
            }
        }
    }
  2. Dinko
    Admin
    Dinko avatar
    221 posts

    Posted 07 Dec 2016 Link to this post

    Hello pierre,

    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.
Back to Top