public static IPrintControlViewModel Create()
        {
            var unityContainer = new UnityContainer();

            PrintEngineModule.Initialize(unityContainer);
            return(unityContainer.Resolve <IPrintControlViewModel>());
        }
Exemple #2
0
        public static IPrintControlViewModel Create(DataTable dataTable, List <double> columnWidths, string headerTemplate)
        {
            var unityContainer = new UnityContainer();

            PrintEngineModule.Initialize(unityContainer);
            var printControlPresenter = (DataTablePrintControlViewModel)unityContainer.Resolve <IDataTablePrintControlViewModel>();

            SetupDataTablePrintControlPresenter(dataTable, printControlPresenter, columnWidths, headerTemplate);
            return(printControlPresenter);
        }
Exemple #3
0
        public static IPrintControlViewModel Create(Size visualSize, Visual visual)
        {
            var unityContainer = new UnityContainer();

            PrintEngineModule.Initialize(unityContainer);
            var printControlPresenter = (PrintControlViewModel)unityContainer.Resolve <IPrintControlViewModel>();

            var drawingVisual = BuildGraphVisual(new PageMediaSize(visualSize.Width, visualSize.Height), visual);

            printControlPresenter.DrawingVisual = drawingVisual;

            return(printControlPresenter);
        }