4

I use the MonoTouch.Dialog DialogViewController to create a nice view.

private RootElement _createRoot(){
    return new RootElement ("Buy a Property Report"){

            new Section (""){
                new StringElement ("View Sample", ()=>{ }),
                new StringElement ("Enter Address", ()=>{ }),
                new StringElement ("Locate This House", () => { }),
                new StringElement ("My Reports", () => { })
            } 
        };
}

On the following screens I need to have a back button that is different then what I specified in the previous "Buy a Property Report" to "Home"

I do this.

public override void ViewDidLoad ()
{
    base.ViewDidLoad ();
        this.NavigationController.NavigationBar.TopItem.Title = "Home";
}

Is there a way to do this in Monotouch.Dialog instead?

Ian Vink
  • 66,960
  • 104
  • 341
  • 555

1 Answers1

2

I am not sure I understand you question well but try to use this on the dialog controller:

this.NavigationItem.BackBarButtonItem.Title = "Home";
Scarlaxx
  • 835
  • 1
  • 6
  • 13
  • 2
    At what point in the DVC lifecycle do you do this? If I do it in `ViewDidLoad`, BackBarButtonItem is still null. If I do it in `ViewDidAppear`, you can briefly see the default title before it changes to 'Home'. – Tyson Sep 21 '12 at 00:44