diff --git a/docs/android/platform-specifics/listview-fast-scrolling.md b/docs/android/platform-specifics/listview-fast-scrolling.md index 9f609fd4f..3a9cda9ad 100644 --- a/docs/android/platform-specifics/listview-fast-scrolling.md +++ b/docs/android/platform-specifics/listview-fast-scrolling.md @@ -1,7 +1,7 @@ --- title: "ListView fast scrolling on Android" description: "This article explains how to consume the .NET MAUI Android platform-specific that enables fast scrolling through data in a ListView." -ms.date: 04/05/2022 +ms.date: 01/16/2025 --- # ListView fast scrolling on Android @@ -10,7 +10,9 @@ This .NET Multi-platform App UI (.NET MAUI) Android platform-specific is used to ```xaml + xmlns:android="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific;assembly=Microsoft.Maui.Controls" + xmlns:local="clr-namespace:PlatformSpecifics" + x:DataType="local:ListViewViewModel"> ... .ItemsSourceProperty, "GroupedEmployees"); -listView.GroupDisplayBinding = new Binding("Key"); +var listView = new Microsoft.Maui.Controls.ListView { IsGroupingEnabled = true, ItemTemplate = personDataTemplate }; +listView.SetBinding(ItemsView.ItemsSourceProperty, static (ListViewViewModel vm) => vm.GroupedEmployees); // .NET 9+ compiled binding +listView.GroupDisplayBinding = Binding.Create(static (Grouping g) => g.Key); // .NET 9+ compiled binding listView.On().SetIsFastScrollEnabled(true); ```