Net Maui CollectionView, Image Source


I have a CollectionView in .Net Maui, and this collectionview has items as Label and Image, ImageSource i am getting from URL, also I have bottom tabs, and when I am switching tabs and come back to parent tab, all images are lost in collectionview

A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,441 questions
{count} votes

Accepted answer
  1. Sedat SALMAN 5,635 Reputation points

    preserve the view state when switching tabs. To do this, override the OnDisappearing and OnAppearing methods in the parent page of the CollectionView:


    protected override void OnDisappearing()
        // Save the view state (e.g., the CollectionView's content)
    protected override void OnAppearing()
        // Restore the view state (e.g., load the CollectionView's content)
    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful