migueldeicaza/MonoTouch.Dialog — Issue #105: RootElement.Add(section) shows search bar
Author: tp
Created: 2012-02-26 18:05:13+00:00
State: open

When adding a new section to a RootElement, it shows me the search bar (which is enabled for my instance of DialogViewController).

Is this working as expected? Because the doc says: `section: The section to add, if the root is visible, the section is inserted with no animation.`.

Code to reproduce the issue:

var root = new RootElement("Root");
var dvc = new DialogViewController(root) { AutoHideSearch = true, EnableSearch = true };

nav.PushViewController(dvc, true);

Task.Factory.StartNew(() => {
Thread.Sleep(TimeSpan.FromSeconds(1)) ;
UIApplication.SharedApplication.InvokeOnMainThread(() => {
root.Add(new Section() { new StringElement("Element 1") });
});
});

This also happened to me, even if the RootElement already contained some Elements.