I've only verified this on the iPhone simulator.
I'm trying to create a hybrid native/web app where all of the page changes happen in the webview (using the labs HybridWebView). I ran into limitations with the web based navigation bar so I want to use the native navigaton bar and change it dynamically. The problem is when I call ToolbarItems.Clear() only the Primary items are removed, the secondary remain. This also happens when looping through and removing one by one. The ToolbarItems collection shows zero items, but they persist within the UI. Here's a simple example below:
public class ToolbarTestPage : ContentPage
{
public ToolbarTestPage ()
{
ToolbarItems.Add (new ToolbarItem ("settings", "", new Action (ClearToolbarItems), ToolbarItemOrder.Primary, 0));
ToolbarItems.Add (new ToolbarItem("Test","", new Action(ClearToolbarItems), ToolbarItemOrder.Secondary,0));
}
public void ClearToolbarItems()
{
ToolbarItems.Clear ();
}
}
Am I doing something wrong or is this a bug? If this is a bug, could you offer a workaround or something to force the secondary items to be removed?
Thanks