public static Form ShowXamarinControl(this ContentPage ctl, int Width, int Height)
        {
            var f = new Xamarin.Forms.Platform.WinForms.PlatformRenderer();

            Xamarin.Forms.Platform.WinForms.Forms.Init(f);

            f.Width  = Width;
            f.Height = Height;
            var app = new Xamarin.Forms.Application()
            {
                MainPage = ctl
            };

            f.LoadApplication(app);
            ThemeManager.ApplyThemeTo(f);
            if (ctl is IClose)
            {
                ((IClose)ctl).CloseAction = () => f.Close();
            }

            f.ShowDialog();

            return(f);
        }
Example #2
0
 internal static void Init(PlatformRenderer f)
 {
 }