ReedCopsey / Gjallarhorn.Bindable

Unidirectional binding library built on top of Gjallarhorn for WPF and Xamarin Forms
MIT License
27 stars 10 forks source link

Expand Bind.collection to allow other collections than Seq #1

Closed kragt closed 7 years ago

kragt commented 7 years ago

Right now the collection we want to bind has to be a Seq in both the ViewModel and the bind parameters.

Allowing especially Lists would improve a common use case. Ideally we can get Flexible Types to work here.

ReedCopsey commented 7 years ago

This now works. See the sample here: https://github.com/ReedCopsey/Gjallarhorn.Bindable/blob/master/samples/Collections/CollectionSample/Program.fs#L80-L93

In particular, note line 90, which explicitly creates a list (not a seq) to pass in. This matches the VM (Requests is a type alias for Request list).

This has been released in 1.0.0-Beta2 : https://www.nuget.org/packages/Gjallarhorn.Bindable.Wpf/1.0.0-beta2