public DocList() { // Use factory methods and do not use direct creation. DocSaved.Register(this); var rlce = RaiseListChangedEvents; RaiseListChangedEvents = false; AllowNew = false; AllowEdit = false; AllowRemove = false; RaiseListChangedEvents = rlce; }
/// <summary> /// This method is called on a newly deserialized object /// after deserialization is complete. /// </summary> protected override void OnDeserialized() { base.OnDeserialized(); DocSaved.Register(this); // add your custom OnDeserialized actions here. }