You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 7, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on May 7, 2022. It is now read-only.
maybe I'm doing something very silly, but if I try to bind the SelectedItems property of the control I get exceptions as the dependencyproperty seems to be null, even if I initialised it.
I think I've never done that. My approach was to bind each item's IsSelected property (this is prone to missed notifications while items are virtualised away) or do the selection stuff in the view code (.xaml.cs) instead. I'm not using this code anymore and I can't offer much support for it now.
Activity
CBenghi commentedon Dec 10, 2021
I've looked at the code and I think the problem lies with the initialization of the
SelectedItemsproperty.It is initialized at the following lines in the constuctor:
MultiSelectTreeView/MultiSelectTreeView/Controls/MultiSelectTreeView.cs
Lines 89 to 91 in 8dadce5
whereas it should be initialized in the metadata of the DependencyProperty with something like the following:
I'm happy to post a PR if this solution works for you.
ygoe commentedon Dec 11, 2021
I think I've never done that. My approach was to bind each item's IsSelected property (this is prone to missed notifications while items are virtualised away) or do the selection stuff in the view code (.xaml.cs) instead. I'm not using this code anymore and I can't offer much support for it now.