public static IPrintControlViewModel Create() { var unityContainer = new UnityContainer(); PrintEngineModule.Initialize(unityContainer); return(unityContainer.Resolve <IPrintControlViewModel>()); }
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); }
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); }