コード例 #1
0
 private void ActiveViews_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     if (e.Action == NotifyCollectionChangedAction.Add)
     {
         if (stopcount > 0)
         {
             stopcount--;
             foreach (var t in e.NewItems)
             {
                 DocumentWindowIns.AddUserControl(t, false);
             }
         }
         else
         {
             foreach (var t in e.NewItems)
             {
                 DocumentWindowIns.AddUserControl(t, true);
             }
         }
         //DocumentWindowIns.RemovePanFromParent(e.NewItems[0]);
     }
     else if (e.Action == NotifyCollectionChangedAction.Remove)
     {
         foreach (var t in e.OldItems)
         {
             DocumentWindowIns.RemovePanFromParent(t);
         }
     }
 }
コード例 #2
0
 void Region_OnViewActivated(object sender, ActiveViewEventArgs e)
 {
     //throw new System.NotImplementedException();
     DocumentWindowIns.AddUserControl(e.View, true);
 }