示例#1
0
        public ImageRenderer(
            XForms.Controls.Image imageControl)
            : base(imageControl)
        {
            this._xamlImage = new OwnerDrawControl(this);
            this.SetNativeElement(this._xamlImage);

            this._graphicsManager = GraphicsManager.Shared;
            this._graphicsManager.ReloadResources += GraphicsManager_ReloadResources;
            this._graphicsManager.Redraw          += GraphicsManager_Redraw;
        }
示例#2
0
        public UserControlRenderer(
            UserControl userControl)
            : base(userControl)
        {
            this._ownerDrawControl = new OwnerDrawControl(userControl)
            {
                IsTabStop = true,
            };
            NativeDockPanel.SetDock(this._ownerDrawControl, NativeDockRegion.CenterOverlay);

            this._ownerDrawControl.Tapped += Control_Tapped;
            this.SetNativeElement(this._ownerDrawControl);
        }