Reputation: 137
I want to make a favorite page list but OnPropertyChanged(); does not work.
I add a little button to my flyoutpage item when i click on this a popup shown on the screen then i could add favorite list that selected flyoutpage but in my homepage this favorite list doesn't refresh and show new page here.
This picture show my favorite page list but when i add to fav it doesn't refresh.
Here is my code to fill favorite page. :
async void fillFavPageList()
{
FlyoutItemPage f = new FlyoutItemPage(1, "Page1", typeof(Page1));
FlyoutItemPage f1 = new FlyoutItemPage(2, "Page2", typeof(Page2));
FlyoutItemPage f2 = new FlyoutItemPage(3, "Page3", typeof(Page3));
MenuListm.Add(f);
MenuListm.Add(f1);
MenuListm.Add(f2);
var mlist = await App.MyDatabase.ReadPages();
for (int i = 0; i < MenuListm.Count; i++)
{
foreach (var item in mlist)
{
if (item.PAGEID == MenuListm[i].PageID)
{
if (!MyFavPageList.Contains(MenuListm[i])) {
MyFavPageList.Add(MenuListm[i]);
}
}
}
}
OnPropertyChanged();
}
Do you have any advice to make this ?
To make favorite list from flyoutpage's popup menu.
Upvotes: 0
Views: 102