private void GlobalModels_Registered(object sender, Guid e) { PObject obj = GlobalModels.GetModel <PObject>(e); if (obj is PContentPage page) { this.PageList.Add(page); } }
protected override void OnAttachedComponentModel() { base.OnAttachedComponentModel(); if (GlobalModels.HasModel(this.Model.Page)) { pageBox.SelectedItem = GlobalModels.GetModel <PObject>(this.Model.Page); } }
private void GlobalModels_UnRegistering(object sender, Guid e) { PObject obj = GlobalModels.GetModel <PObject>(e); if (obj is PContentPage page) { this.PageList.Remove(page); } }
private void GlobalModels_UnRegistering(object sender, Guid e) { PObject obj = GlobalModels.GetModel <PObject>(e); if (obj is PTemplatePage template) { this.TemplateList.Remove(template); } }
private void GlobalModels_Registered(object sender, Guid e) { PObject obj = GlobalModels.GetModel <PObject>(e); if (obj is PTemplatePage template) { this.TemplateList.Add(template); } }
protected override void OnAttachedComponentModel() { base.OnAttachedComponentModel(); if (GlobalModels.HasModel(this.Model.Template)) { templateBox.SelectedItem = GlobalModels.GetModel <PTemplatePage>(this.Model.Template); } }
public SelectorRenderer(ObjectSelector adornedElement, PSelector model) : base(adornedElement, model) { if (this.Model.TargetVisual != null) { var registedModel = GlobalModels.GetModel <PVisual>(this.Model.TargetVisual.Guid); this.Model.TargetVisual = registedModel; } }
public static IRenderer GetRendererFromGuid(this Guid guid) { if (GlobalModels.HasModel(guid)) { PObject model = GlobalModels.GetModel <PObject>(guid); return(model.GetRenderer()); } return(null); }