Question

I use data binding to create a panorama page. When I go to this page, it will show all of items I add in the MainViewModel.cs. Is it possible to just show specific items(likes item2~item4)on this panorama page. Because I would like to create many different pages using the same ViewModel(but different several items).

No correct solution

OTHER TIPS

You implement two lists in your ViewModel one public which you bind your panorama to and one private which contains all the pages.

public class MainViewModel
{    
    public ObservableCollection<String> ItemsDisplayed; 
    private List<String> _fullList;
    public void UpdateItemsDisplayed()
    {
        if(someCriteria)
             ItemsDisplayed.Add(_fullList[1]);
    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top