Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b94d487

Browse files
Update readme file.
1 parent c9b5575 commit b94d487

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,14 +1017,6 @@ The `BindableListView` control is the most efficient way to create lists. It use
10171017

10181018
The following example demonstrates how to bind to a collection of users with `BindableListView`.
10191019

1020-
Create a main `UI Document` named `UsersView.uxml` with the following content.
1021-
1022-
```xml
1023-
<ui:UXML xmlns:uitk="UnityMvvmToolkit.UITK.BindableUIElements" ...>
1024-
<uitk:BindableListView binding-items-source-path="Users" />
1025-
</ui:UXML>
1026-
```
1027-
10281020
Create a `UI Document` named `UserItemView.uxml` for the individual items in the list.
10291021

10301022
```xml
@@ -1056,7 +1048,7 @@ public class UserItemViewModel : ICollectionItem
10561048
}
10571049
```
10581050

1059-
Create a `UserListView` that inherits the `BindableListViewWrapper<TItemBindingContext>` abstract class.
1051+
Create a `UserListView` that inherits the `BindableListView<TItemBindingContext>` abstract class.
10601052

10611053
```csharp
10621054
public class UserListView : BindableListView<UserItemViewModel>
@@ -1086,7 +1078,7 @@ public class UsersViewModel : IBindableContext
10861078
}
10871079
```
10881080

1089-
Create a `UsersView` with the following content.
1081+
Create a `UsersView` as follows.
10901082

10911083
```csharp
10921084
public class UsersView : DocumentView<UsersViewModel>
@@ -1103,6 +1095,14 @@ public class UsersView : DocumentView<UsersViewModel>
11031095
}
11041096
```
11051097

1098+
Finally, create a main `UI Document` named `UsersView.uxml` with the following content.
1099+
1100+
```xml
1101+
<ui:UXML ...>
1102+
<UserListView binding-items-source-path="Users" />
1103+
</ui:UXML>
1104+
```
1105+
11061106
#### BindableScrollView
11071107

11081108
The `BindableScrollView` has the same binding logic as the `BindableListView`. It does not use virtualization and creates VisualElements for all items regardless of visibility.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /