-
Notifications
You must be signed in to change notification settings - Fork 82
Description
In Unity-Weld-Examples, there is one Dropdown example. The example shows how to connect to a simple string[] array in the view model, but that only updates the list once upon initialization.
I'm having a hard time figuring out how to bind to a list so it will automatically update upon changes in that list. The example uses a simple string[] as the type, but I noticed that there are classes like ObservableList and BoundObservableList. So I thought I could maybe use those types of lists instead, but no luck. Simply making the string[] array property a [Binding] and doing a call to OnPropertyChanged("MyList") when the list is changed, seems to have no effect.
I looked at the code of DropdownBinding, but couldn't figure out if and how it could be done. I feel like I'm missing something really obvious here, so that's why I thought it's probably best to ask you.
On a side note: I'm using this to link to items from a database, so I'd like to use the ID of those items as the actual value that is used as the Selection value. I'm pretty sure that could be done by using the "Selection View Model To UI Adapter", "Selection UI To View Model Adapter" and "Options Adapter" settings. So hopefully a solution exists where I could solve both of these "problems" at the same time. Thanks.