Constructor GridView
GridView()
Creates a GridView with all default properties. The itemsSource, itemHeight, makeItem and bindItem properties must all be set for the GridView to function properly.
Declaration
public GridView()
GridView(IList, Func<VisualElement>, Action<VisualElement, int>)
Constructs a GridView, with all required properties provided.
Declaration
public GridView(IList itemsSource, Func<VisualElement> makeItem, Action<VisualElement, int> bindItem)
Parameters
Type | Name | Description |
---|---|---|
IList | itemsSource | The list of items to use as a data source. |
Func<VisualElement> | makeItem | The factory method to call to create a display item. The method should return a VisualElement that can be bound to a data item. |
Action<VisualElement, int> | bindItem | The method to call to bind a data item to a display item. The method receives as parameters the display item to bind, and the index of the data item to bind it to. |