ListView Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ListView() |
Creates and initializes a new instance of the ListView class. |
ListView(ListViewCachingStrategy) |
Creates and initializes a new instance of the ListView class. |
ListView()
- Source:
- ListView.cs
- Source:
- ListView.cs
- Source:
- ListView.cs
Creates and initializes a new instance of the ListView class.
public:
ListView();
public ListView();
Public Sub New ()
Applies to
ListView(ListViewCachingStrategy)
- Source:
- ListView.cs
- Source:
- ListView.cs
- Source:
- ListView.cs
Creates and initializes a new instance of the ListView class.
public:
ListView(Microsoft::Maui::Controls::ListViewCachingStrategy cachingStrategy);
public ListView(Microsoft.Maui.Controls.ListViewCachingStrategy cachingStrategy);
new Microsoft.Maui.Controls.ListView : Microsoft.Maui.Controls.ListViewCachingStrategy -> Microsoft.Maui.Controls.ListView
Public Sub New (cachingStrategy As ListViewCachingStrategy)
Parameters
- cachingStrategy
- ListViewCachingStrategy
A value that indicates how the List View should manage memory when displaying data items using a data template.
Remarks
For memory and performance reasons, application developers should strongly prefer RecycleElement, when possible. See ListViewCachingStrategy for more details.
When developers specify RecycleElement, OnElementChanged
events are not raised when cells are recycled. Instead, the cell is retained and its property values change when the binding context is updated to that of an available cell, OnElementPropertyChanged
events are raised. Application developers should remember to listen for the correct events, and should note that their renderers will need to be updated if the default behavior changes to RecycleElement in a future release.