Update

How to update the movie list, update function dont works

thanks!

What are you trying to update? Are you trying to add a new item to the list?

no i want to update the movie list because did not update the search

no i want to update the movie list because did not update the search

You are referring to the Movie List example program, correct? Currently there is no update in that program, that’s why I’m not sure which update you are referring to. The list is simply populated when the program starts. Are you looking to filter the list based on a search?

yeahhh!

If your list is huge then you will want to repopulate it based on a filter, and limit how much you add. Look at that foreach loop in MyApp. You can attach this to a button callback in stead, and simply repopulate:

void OnButtonClick(object s, object a)
{
    //remove old items first
    Listing.Children.Clear();

    //add new ones
    foreach (var movie in _movies) 
    {
        var ui = new MovieEntry
        {
            Cover = new BundleFileImageSource( movie.Cover ),
            Title = movie.Title,
            Duration = movie.Duration,
            Rating = movie.Rating,
        };
        Listing.AddChild(ui);
    }}

If the list is small you can dynamically collapse the items in the list.

foreach (var child in Listing.Children)
{
    if (YourVisibilityFunction(child))
        child.Visiblity = Visibility.Visible;
    else
        child.Visibility = Visibility.Collapsed;
}

Thanks! works

and how i do to just show me one movie?

becouse the list show me repeated movies

Do you mean list just one item in the list? There’s nothing special about that, either just add one item, or hide all but one item.

not the search when im looking for a movie show one but Repeated

ej: hi (3 movies) his(1 movie repeated)

Can you provide me with the full project where you have implemented the search?