//------------------------------------------------------------------------------------------------------------- private void InitializeTemplate() { _template = new EntryComponentTemplate(SelectedType, Holder); _template.OnTemplateEditChanged += OnTemplateChanged; if (OnEditModeModified != null) { OnEditModeModified(); } }
public EntryComponentTemplate(EntryComponentTemplate other) { if (other == null) { throw new ArgumentNullException(); } _holder = other._holder; _templateComponent = (EntryComponent)other.TemplateInstance.Clone(); //note: the observers list was not cloned as it will mess up the "components entry template" // _observersList = other.ObserversList.Select(x => x.Clone() as EntryComponent).ToList(); _templateComponent.OnEditModeModified += OnTemplateEditChanged_UpdateObservers; other.ObserversList.ForEach(x => x.CloneTo(AddObserver())); }
public object Clone() { EntryComponentTemplate returnVal = new EntryComponentTemplate(this); return(returnVal); }
protected override void Initialize(string componentName = "Object field name") { base.Initialize(componentName); _countLimiter = null; _template = null; }