public LayoutPartViewModel(LayoutPartDescriptionViewModel layoutPartDescriptionViewModel) { LayoutPartDescriptionViewModel = layoutPartDescriptionViewModel; LayoutPart = new LayoutPart() { DescriptionUID = LayoutPartDescriptionViewModel.LayoutPartDescription.UID, UID = Guid.NewGuid(), }; Initialize(); LayoutPart.Properties = Content.Properties; }
public LayoutPartViewModel(LayoutPart layoutPart) { LayoutPart = layoutPart; LayoutPartDescriptionViewModel = LayoutDesignerViewModel.Instance.LayoutElementsViewModel.LayoutParts.FirstOrDefault(item => item.LayoutPartDescription.UID == LayoutPart.DescriptionUID) ?? new LayoutPartDescriptionViewModel(new UnknownLayoutPartDescription(LayoutPart.DescriptionUID)); Initialize(); }
public LayoutPartViewModel(LayoutPart layoutPart, ILayoutPartPresenter layoutPartPresenter) { LayoutPart = layoutPart; LayoutPartPresenter = layoutPartPresenter; Content = LayoutPartPresenter.CreateContent(LayoutPart.Properties); }