# BaseVerticalCollectionView

> Creates a BaseVerticalCollectionView with all default properties. The _itemsSource must all be set for the BaseVerticalCollectionView to function properly.

## Definition

* **Type:** Constructor
* **Namespace:** [UnityEngine.UIElements](/engine/6000.5/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

## BaseVerticalCollectionView()

Creates a [BaseVerticalCollectionView](/engine/6000.5/script-reference/unityengine/uielements/baseverticalcollectionview.md) with all default properties. The [\_itemsSource](/engine/6000.5/script-reference/unityengine/uielements/baseverticalcollectionview/itemssource.md) must all be set for the BaseVerticalCollectionView to function properly.

```csharp
public BaseVerticalCollectionView()
```

## BaseVerticalCollectionView(IList, float)

Constructs a [BaseVerticalCollectionView](/engine/6000.5/script-reference/unityengine/uielements/baseverticalcollectionview.md), with all required properties provided.

```csharp
public BaseVerticalCollectionView(IList itemsSource, float itemHeight = -1)
```

### Parameters

**** (\[IList]\(https\://learn.microsoft.com/dotnet/api/system.collections.ilist)): The list of items to use as a data source.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The height of each item, in pixels. For `FixedHeight` virtualization only.

## BaseVerticalCollectionView(IList, float, Func\<VisualElement>, Action\<VisualElement, int>)

Obsolete. Use [ListView](/engine/6000.5/script-reference/unityengine/uielements/listview.md) or [TreeView](/engine/6000.5/script-reference/unityengine/uielements/treeview.md) constructor directly.

> **Warning:**
>
> **Deprecated.** makeItem and bindItem are now in ListView and TreeView directly, please use a constructor without these parameters.

```csharp
public BaseVerticalCollectionView(IList itemsSource, float itemHeight = -1, Func<VisualElement> makeItem = null, Action<VisualElement, int> bindItem = null)
```

### Parameters

**** (\[IList]\(https\://learn.microsoft.com/dotnet/api/system.collections.ilist)): The list of items to use as a data source.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The height of each item, in pixels. For `FixedHeight` virtualization only.**** (\[Func\<VisualElement>]\(https\://learn.microsoft.com/dotnet/api/system.func-1)): 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>]\(https\://learn.microsoft.com/dotnet/api/system.action)): 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.
