Skip to content

Add CollectionView separator guidance to item template docs#3246

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-separators-to-collectionview
Draft

Add CollectionView separator guidance to item template docs#3246
Copilot wants to merge 2 commits intomainfrom
copilot/add-separators-to-collectionview

Conversation

Copy link
Contributor

Copilot AI commented Mar 18, 2026

The CollectionView docs state separators "can be provided, if desired, in the item template" but never show how. This adds concrete examples.

Changes

  • populate-data.md: New "Add separators between items" section after "Define item appearance" with two approaches:
    • Line separatorBoxView at the bottom of the item template (closest to ListView's built-in separator)
    • Card-style separatorBorder with RoundRectangle stroke shape wrapping item content
  • index.md: Updated both the bullet list and migration table separator references to link to the new section

Example (line separator approach)

<CollectionView.ItemTemplate>
    <DataTemplate x:DataType="models:Monkey">
        <VerticalStackLayout>
            <Grid Padding="10">
                <!-- item content -->
            </Grid>
            <BoxView HeightRequest="1"
                     Color="LightGray"
                     HorizontalOptions="Fill" />
        </VerticalStackLayout>
    </DataTemplate>
</CollectionView.ItemTemplate>

The section frames these as suggestions, noting developers can implement separators any way that suits their design.

Original prompt

This section details on the original issue you should resolve

<issue_title>CollectionView separators - a teaser, we need more</issue_title>
<issue_description>### Type of issue

Missing information

Description

CollectionView does not include built-in separators. These can be provided, if desired, in the item template.

OK, but how? I'm off to find out, but I would argue that it is the documentation's responsibility to not just tease, but provide an answer / example, or link to something relevant.

Page URL

https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/collectionview/?view=net-maui-8.0

Content source URL

https://github.com/dotnet/docs-maui/blob/main/docs/user-interface/controls/collectionview/index.md

Document Version Independent Id

56821f6d-0cf1-2330-a905-1107313bc8dc

Article author

@davidbritch

Metadata

  • ID: 56821f6d-0cf1-2330-a905-1107313bc8dc
  • Service: dotnet-mobile
  • Sub-service: dotnet-maui</issue_description>

<agent_instructions>Can you add a suggestion for this. Look in the issue comments there it a way to do it. Figure out if that is the best way or if there are other ways to do it that are better. Add this to the relevant doc but highlight its a suggestion and that people can implement it anyway they see fit.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.


Internal previews

📄 File 🔗 Preview link
docs/user-interface/controls/collectionview/index.md docs/user-interface/controls/collectionview/index
docs/user-interface/controls/collectionview/populate-data.md docs/user-interface/controls/collectionview/populate-data

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 31460dc:

✅ Validation status: passed

For more details, please refer to the build report.

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
Copilot AI changed the title [WIP] Update documentation to include example for CollectionView separators Add CollectionView separator guidance to item template docs Mar 18, 2026
@learn-build-service-prod
Copy link
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

Copilot AI requested a review from jfversluis March 18, 2026 10:02
@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit c97a90c:

✅ Validation status: passed

File Status Preview URL Details
docs/user-interface/controls/collectionview/index.md ✅Succeeded View (>=net-maui-8.0)
docs/user-interface/controls/collectionview/populate-data.md ✅Succeeded View (>=net-maui-8.0)

For more details, please refer to the build report.

@lonelymaw
Copy link

If possible, I would love if the default documentation on separators would explain how to hide the separator after the last element. So far, this has been nontrivial to implement, so an officially recommended pattern would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CollectionView separators - a teaser, we need more

3 participants