Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

CreateViewController doesn't set title & doesn't work properly with ToolbarItems

$
0
0

Hello,

I've just started using Xamarin.Forms for iOS and encountered with couple issues. CreateViewController doesn't set Title for UIViewController. I use the following code:

Welcome = (new Views.Welcome()).CreateViewController();
var controller = new BaseNavigationController (Welcome);
PresentViewController (controller, true, null);

and

 public partial class Welcome : BaseView
{
    public Welcome()
    {
        Title = GetString ("welcome");

        var stack = new StackLayout {
            Orientation = StackOrientation.Vertical,
            Padding = new Thickness(0, 8, 0, 8)
        };

        ToolbarItems.Add (new ToolbarItem () {
            Name = GetString("cancel")
        });

        Content = stack;
    }
}

I don't see Toolbar here too.

Thanks!


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>