Esempio n. 1
0
 // Constructor.
 public XClockEmbed(String title, int width, int height)
     : base(title, width, height)
 {
     embed         = new EmbeddedApplication(this, 0, 0, width, height);
     embed.Program = "xclock";
     embed.Launch();
 }
Esempio n. 2
0
        public static UIViewController CreateViewController(this Page page)
        {
            if (!Forms.IsInitialized)
            {
                throw new InvalidOperationException("call Forms.Init() before this");
            }

            if (!(page.RealParent is Application))
            {
                Application app = new EmbeddedApplication();
                app.MainPage = page;
            }

            var result = new Platform.iOS.Platform();

            result.SetPage(page);
            return(result.ViewController);
        }
        public static View CreateView(this Page page)
        {
            if (!Forms.IsInitialized)
            {
                throw new InvalidOperationException("call Forms.Init() before this");
            }

            if (!(page.RealParent is Xamarin.Forms.Application))
            {
                Xamarin.Forms.Application app = new EmbeddedApplication();
                app.MainPage = page;
            }

            var result = new Platform();

            result.SetPage(page);

            return(result.Element);
        }