public override void OnRebuildComplete(PropertyValue activePropertyValue) { if (this.transactionHelper != null) { this.transactionHelper.CommitOutstandingTransactions(0); } if (this.sceneNodePropertyLookup != null) { this.sceneNodePropertyLookup.ClearProperties(); this.sceneNodePropertyLookup.Unhook(); this.sceneNodePropertyLookup = (SceneNodePropertyLookup)null; } if (activePropertyValue == null) { return; } SceneNodeProperty sceneNodeProperty = (SceneNodeProperty)activePropertyValue.get_ParentProperty(); this.sceneNodePropertyLookup = new SceneNodePropertyLookup(sceneNodeProperty.SceneNodeObjectSet, sceneNodeProperty.Reference); using (IEnumerator <PropertyEntry> enumerator = activePropertyValue.get_SubProperties().GetEnumerator()) { while (((IEnumerator)enumerator).MoveNext()) { SceneNodeProperty property = enumerator.Current as SceneNodeProperty; if (property != null) { this.sceneNodePropertyLookup.AddProperty(property.Reference, property); } } } bool isMixed; DocumentNode valueAsDocumentNode = sceneNodeProperty.GetLocalValueAsDocumentNode(true, out isMixed); SceneNode[] selectedObjects; if (valueAsDocumentNode != null) { selectedObjects = new SceneNode[1] { sceneNodeProperty.SceneNodeObjectSet.ViewModel.GetSceneNode(valueAsDocumentNode) } } ; else { selectedObjects = new SceneNode[0]; } foreach (CategoryBase categoryBase in (IEnumerable <CategoryBase>) this.Categories) { SceneNodeCategory sceneNodeCategory = categoryBase as SceneNodeCategory; if (sceneNodeCategory != null) { sceneNodeCategory.OnSelectionChanged(selectedObjects); } } }
public override void OnRebuildComplete(Microsoft.Windows.Design.PropertyEditing.PropertyValue activePropertyValue) { if (this.transactionHelper != null) { this.transactionHelper.CommitOutstandingTransactions(0); } if (this.sceneNodePropertyLookup != null) { this.sceneNodePropertyLookup.ClearProperties(); this.sceneNodePropertyLookup.Unhook(); this.sceneNodePropertyLookup = (SceneNodePropertyLookup)null; } if (activePropertyValue == null) { return; } SceneNodeProperty sceneNodeProperty = (SceneNodeProperty)activePropertyValue.ParentProperty; this.sceneNodePropertyLookup = new SceneNodePropertyLookup(sceneNodeProperty.SceneNodeObjectSet, sceneNodeProperty.Reference); foreach (PropertyEntry propertyEntry in activePropertyValue.SubProperties) { SceneNodeProperty property = propertyEntry as SceneNodeProperty; if (property != null) { this.sceneNodePropertyLookup.AddProperty(property.Reference, property); } } bool isMixed; DocumentNode valueAsDocumentNode = sceneNodeProperty.GetLocalValueAsDocumentNode(true, out isMixed); SceneNode[] selectedObjects; if (valueAsDocumentNode != null) { selectedObjects = new SceneNode[1] { sceneNodeProperty.SceneNodeObjectSet.ViewModel.GetSceneNode(valueAsDocumentNode) } } ; else { selectedObjects = new SceneNode[0]; } foreach (CategoryBase categoryBase in (IEnumerable <CategoryBase>) this.Categories) { SceneNodeCategory sceneNodeCategory = categoryBase as SceneNodeCategory; if (sceneNodeCategory != null) { sceneNodeCategory.OnSelectionChanged(selectedObjects); } } }