public void Update() { M2SceneNode node = ModelSceneService.Instance.MainM2SceneNode; Geosets.Clear(); if (node == null) { return; } SGeoset[] geosets = node.Geosets; for (int i = 0; i < node.Geosets.Length; ++i) { M2Geoset g = new M2Geoset(ref geosets[i], i, node.IsGeosetShow(i)); Geosets.Add(g); g.PropertyChanged += new PropertyChangedEventHandler(geoset_PropertyChanged); } geosetsView = CollectionViewSource.GetDefaultView(Geosets); }