Share via

How to fix Expand and Collapse issue of CollectionView control on MAC?

Chaitrali Joshi 0 Reputation points
Feb 11, 2025, 7:28 AM

Hello,

Application is developed in .Net MAUI and supporting both platforms , MacOS and Windows.

On MAC 14.2 and 15.3, I am using CollectionView to display list of items and on clicking ImageButton of type 'ActivityStep', we are setting IsVisible = false to hide items under 'ActivityStep', it shows blank space instead of collapsing. Expands the items properly on clicking again.

Please see below images and sample CollectionView code CollectionView xaml.txt attached along with Custom ObservableCollection<T> wrapper class AsyncObservableCollection.txt. Its only happening for MACCATALYST, on Windows there is no issue with expand and collapse.

1. CollectionView.png

2. Collapsed CollectionView.png

3. Row hiding issue on MAC.png

4. Row hiding issue on MAC.png

Please assist ASAP.

Thanks,

Chaitrali

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,942 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Chaitrali Joshi 0 Reputation points
    Feb 21, 2025, 11:01 AM

    StepList is a type of AsyncObservableCollection. The text file for same is attached in Question. On CollapseCommand , we set DocumentStep.IsCollapsed and based on that IsVisibility property is set to true or false.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.