Beispiel #1
0
        // ReSharper disable once UnusedMethodReturnValue.Local
        private IRenderer <Bitmap> Cook(IViewHost <Bitmap> form)
        {
            var renderer = new BitmapRenderer(form,
                                              RenderKit.MeasureContext, RenderKit.RenderContext);
            var _ = new LoopViewUpdater <Bitmap>(form, renderer, RenderKit.RenderContext.LayoutQueue);

            return(renderer);
        }
Beispiel #2
0
        // ReSharper disable once UnusedMember.Global
        public GdiHostedElement HostStatic <TViewModel>(TViewModel viewModel
                                                        , IView view)
        {
            var control  = new GdiHostedElement(view);
            var renderer = new BitmapRenderer(control,
                                              RenderKit.MeasureContext, RenderKit.RenderContext);

            view.DataContext = viewModel;


            control.BackingBitmap = renderer.DoRender();

            return(control);
        }