Hi team,
On click of a ToolBarItem, we were removing few other toolbar items and later we used to add it back. This page in question is of type Content Page
ToolbarItems.Remove and ToolbarItems.Add is not working as expected now. Once we reach to the page using a push async.
Though the same code will work fine if we go to anther page with Push Model Async and comes back to the same page using Pop Model Async.
Looks like initially the ToolBarItems are unable to associate with the ContentPage, though once we comes back to the same page after a POP Model async, it seems to be working...
Sample Code:
var tbiFilter = new ToolbarItem(Vernacular.Catalog.GetString("FilterLabel"), Vernacular.Catalog.GetString("DownImage"), () =>
{
......
if (_filterLayout.IsVisible)
{
......
#if __ANDROID__
ToolbarItems.Add(_searchIcon);
ToolbarItems.Add(_refreshIcon);
#endif
}
else
{
......
#if __ANDROID__
ToolbarItems.Remove(_searchIcon);
ToolbarItems.Remove(_refreshIcon);
#endif
}
......
});