Exemple #1
0
        protected virtual void OnChildDeleted(object sender, EventArgs e)
        {
            ExportableViewModel evm = sender as ExportableViewModel;

            if (evm == null)
            {
                throw new ArgumentException("ExportableViewModel expected!");
            }
            UnregisterExportableChild(evm);
        }
Exemple #2
0
 protected void UnregisterExportableChild(ExportableViewModel child)
 {
     child.StateChanged -= OnChildStateChanged;
     child.Deleted      -= OnChildDeleted;
     children.Remove(child);
 }
Exemple #3
0
 protected void RegisterExportableChild(ExportableViewModel child)
 {
     child.StateChanged += OnChildStateChanged;
     child.Deleted      += OnChildDeleted;
     children.Add(child);
 }