Exemple #1
0
        void InternalSetPage(Xamarin.Forms.Page page)
        {
            IList <Action <SKCanvas, int, int> > renderChildren = new List <Action <SKCanvas, int, int> >();

            _layout.AddView(new NativeSkiaView(this, new SkiaView((canvas, w, h) =>
            {
                canvas.Clear(SKColors.White);
                _canvas = canvas;
                _size   = new Xamarin.Forms.Size(w, h);
                foreach (var renderer in renderChildren)
                {
                    renderer(canvas, w, h);
                }
            })));

            _layout.BringToFront();

            AddRenderers(page, renderChildren);
        }
Exemple #2
0
        void InternalSetPage(Page page)
        {
            if (!Forms.IsInitialized)
            {
                throw new InvalidOperationException("Call Forms.Init (Activity, Bundle) before this");
            }

            if (Platform != null)
            {
                Platform.SetPage(page);
                return;
            }

            PopupManager.ResetBusyCount(this);

            Platform = new AppCompat.Platform(this);
            Platform.SetPage(page);
            _layout.AddView(Platform);
            _layout.BringToFront();
        }