diff --git a/docs/user-interface/controls/tableview.md b/docs/user-interface/controls/tableview.md index f2f67cfa3..2cf370eb8 100644 --- a/docs/user-interface/controls/tableview.md +++ b/docs/user-interface/controls/tableview.md @@ -1,7 +1,7 @@ --- title: "TableView" description: "The .NET MAUI TableView displays a table of scrollable items that can be grouped into sections." -ms.date: 03/13/2025 +ms.date: 08/19/2025 ms.custom: sfi-image-nochange --- @@ -18,6 +18,83 @@ The .NET Multi-platform App UI (.NET MAUI) is deprecated in .NET 10. For most scenarios, you should migrate to , which uses an to define item appearance rather than cells. + +- TextCell/ImageCell/ViewCell → Define a DataTemplate for your item type +- SwitchCell/EntryCell → Compose those controls inside the item template +- Grouping → Use `IsGrouped="true"` with `GroupHeaderTemplate` / `GroupFooterTemplate` + +Before (TableView with TextCell): + +```xaml + + + + + + + + +``` + +After (CollectionView with DataTemplate): + +```xaml + + + + + + + + + + + +``` + +Before (TableView with SwitchCell): + +```xaml + + + + + + + +``` + +After (CollectionView with composed controls): + +```xaml + + + + + + + + +``` + +For guidance on building lists, see: + +- [Populate a CollectionView with data](~/user-interface/controls/collectionview/populate-data.md) +- [Define item appearance](~/user-interface/controls/collectionview/populate-data.md#define-item-appearance) +- [Display grouped data in a CollectionView](~/user-interface/controls/collectionview/grouping.md) + +::: moniker-end + While manages the appearance of the table, the appearance of each item in the table is defined by a . .NET MAUI includes five cell types that are used to display different combinations of data, and you can also define custom cells that display any content you want. defines the following properties: