public IUiService Create(IModelService modelService, IDiagramService diagramService, double minZoom, double maxZoom, double initialZoom) { var diagramViewModel = new RoslynDiagramViewModel(modelService, diagramService, _initialIsDescriptionVisible, minZoom, maxZoom, initialZoom); return(new ApplicationUiService(_hostUiServices, diagramViewModel)); }
public RoslynUiService(IHostUiServices hostUiServices, RoslynDiagramViewModel diagramViewModel) : base(diagramViewModel) { _hostUiServices = hostUiServices; _diagramViewModel = diagramViewModel; _resourceDictionary = ResourceHelpers.GetResourceDictionary(DiagramStylesXaml, Assembly.GetExecutingAssembly()); _diagramControl = new DiagramControl(_resourceDictionary) { DataContext = _diagramViewModel }; Initialize(_resourceDictionary, _diagramControl); hostUiServices.HostDiagram(_diagramControl); }