migueldeicaza/MonoTouch.Dialog — Issue #100: Trouble updating section
Author: bni007
Created: 2012-02-15 12:26:04+00:00
State: open

I have a dialog where upon a button click I need to update dialog with some buttons removed and other added:

section1.Add (new StringElement ("Foo", delegate {

section1.Clear ();

section1.Add (new StringElement ("Test", delegate {
CooperUtils.Alert ("Hello");
}) { Alignment = UITextAlignment.Center });

}));

The button is correctly inserted but the Alignment is wrong and theres no "mouseover/click" highlight effect when clicked. If I remove the section1.Clear() it works properly.