class
GridView
Inherits from ListView
A ListView whose list items can be arranged in a 2D layout.
Remarks
Percent-based Layout properties on UIBlocks parented directly to a GridView are calculated relative to their "virtual" parent GridSlice, not the GridView itself.
Properties
| CrossAxis | The non-scrolling axis along which GridSlice's will position items. |
| CrossAxisItemCount | The number of elements to position along the CrossAxis. |
| MaxLoadedSliceIndex | The highest slice index currently loaded into the grid view. |
| MinLoadedSliceIndex | The lowest slice index currently loaded into the grid view. |
| PrimaryAxis | The scrolling axis to position elements in the grid. Assigned implicitly from the Axis configured on the UIBlock. |
Methods
| ClearSliceProvider | Clears any GridSliceProviderCallback<T> callback previously assigned via |
| GetDataSourceAsGrid | Wraps the GridView's underlying data source in a GridList<T> to be indexable by a GridIndex, where Row is the index into the PrimaryAxis and Column is the index into the CrossAxis. |
| SetSliceProvider (3 overloads) |
|
| TryGetGridItem | Retrieves the ItemView representing the object in the data source at the provided GridIndex if it's paged into the GridView. |
| UpdateGridSlice | Invokes the configured grid slice provider, set via SetSliceProvider(GridSliceProviderCallback<GridSlice>), for the grid |
Inherited Properties
| DataSourceItemCount | The size of the underlying data source. Will return |
| MaxLoadedIndex | The highest index into the data source mapped to a list item that's currently loaded into view. |
| MinLoadedIndex | The lowest index into the data source mapped to a list item that's currently loaded into view. |
| OutOfViewDistance | The distance a list item must be out of view before it's removed and added back into the list item pool. |
| UIBlock | The parent UIBlock of all the list items. Attached to |
Inherited Methods
| AddDataBinder | Subscribe to an indexed Data.OnBind<TData> event on this ListView's set of list items |
| AddDataUnbinder | Subscribe to an indexed Data.OnUnbind<TData> event on this ListView's set of list items |
| AddGestureHandler | Subscribe to an indexed IGestureEvent event on this ListView's set of list items |
| AddPrefabProvider | Register a PrefabProviderCallback<T> for a particular data type in the data source, |
| GetDataSource | Retrieve the underlying data source, previously assigned via SetDataSource<T>(IList<T>). |
| JumpToIndex | Jumps the ListView to the item at the given index. |
| JumpToIndexPage | Jumps the ListView to the virtualized page of the item at the given index |
| Rebind | Reprocesses the object at index |
| Refresh | Synchronizes the items in view with the content of the underlying data source, previously assigned via SetDataSource<T>(IList<T>). |
| Relayout | The ListView will pull more content into view and page content out of view as it's scrolled, but it doesn't automatically check for external |
| RemoveDataBinder | Unsubscribe from an indexed Data.OnBind<TData> event previously subscribed to via AddDataBinder<TData, TVisuals>(UIEventHandler<Data.OnBind<TData>, TVisuals, Int32>) |
| RemoveDataUnbinder | Unsubscribe from an indexed Data.OnUnbind<TData> event previously subscribed to via AddDataUnbinder<TData, TVisuals>(UIEventHandler<Data.OnUnbind<TData>, TVisuals, Int32>) |
| RemoveGestureHandler | Unsubscribe from a gesture event previously subscribed to via AddGestureHandler<TEvent, TVisuals>(UIEventHandler<TEvent, TVisuals, Int32>) |
| RemovePrefabProvider | Unregister a PrefabProviderCallback<T> that was previously registered via AddPrefabProvider<TData>(PrefabProviderCallback<Int32>) |
| Scroll | Scrolls the list content by the provided |
| SetDataSource | Set the underlying data source. This instructs the list to start creating a 1-to-1 mapping of objects in the data source to ListView list items. |
| TryDetach (2 overloads) |
|
| TryGetItemView | Attempts to retrieve the ItemView in view representing the object in the data source at the provided index, |
| TryGetSourceIndex | Attempts to retrieve the index into the data source, |
| TryReattach | If a list item was previously detached from the ListView (via TryDetach(ItemView, Transform)),
this is a way to transfer ownership of |
Inherited Events
| OnScrolledPastEnd | Invoked when the list is scrolled beyond the last list element. Provides the distance between the edge of content and edge of the viewport. |
| OnScrolledPastStart | Invoked when the list is scrolled beyond the first list element. Provides the distance between the edge of content and edge of the viewport. |