Hi @SkywardAssembly !
Sorry, I didn’t catch this post quickly. So the announcement has been made here .
Regarding the ListView
, I would say that it’s partially supported in the runtime bindings system. I say partially because you can use the DataBinding
type to create bindings between your data and the bindable properties of the ListView
, however the ListView
requires a little bit more logic to function properly.
So the best way to use the new system with the ListView
control is to do the following:
- Create a
VisualTreeAsset
to contain the UI of the list item. - Set the asset created in 1. as the
itemTemplate
of theListView
. This is a new property that we added to make it easier to setup theListView
and to use the new binding system. - Set the
bindingSourceSelectionMode
toAutoAssign
. What this will do is that it will set theitemsSource
as thedataSource
of each item and it will prefix thedataSourcePath
with the correct index.
You can use bindings to set the itemsSource
itself and the other various properties of the ListView
. You should note however that the itemsSource
property is not available in the UI Builder, so the binding must be manually added in the UXML file.
What makes the support partial is:
- It won’t call the
ListView.RefreshItems()
orListView.Rebuild()
for you whenever the list size changes. Depending on what you are doing, this can be achieved by creating aCustomBinding
that tracks the size of theitemsSource
and call refresh whenever it changes. - If the
ListView
is refreshed or rebuilt after the binding operations has been completed, yourListView
might be temporarily displaying outdated information.
This will be part of the “Current limitations & what’s next” part of the announcement, but I haven’t had time yet to write it.
Hope this helps!