protected SceneNodeProperty RequestUpdates(PropertyReference propertyReference, PropertyChangedEventHandler propertyChanged) { SceneNodeProperty sceneNodeProperty = this.basisProperty.SceneNodeObjectSet.CreateSceneNodeProperty(propertyReference, (AttributeCollection)null); sceneNodeProperty.get_PropertyValue().add_PropertyChanged(propertyChanged); this.listeningProperties.Add(sceneNodeProperty, propertyChanged); return(sceneNodeProperty); }
protected void RemovePropertyChangedListener(SceneNodeProperty property) { PropertyChangedEventHandler changedEventHandler = (PropertyChangedEventHandler)null; if (!this.listeningProperties.TryGetValue(property, out changedEventHandler)) { return; } property.get_PropertyValue().remove_PropertyChanged(changedEventHandler); this.listeningProperties.Remove(property); }
private void SetPropertyValueCore(SceneNodeProperty parentProperty, SceneNode valueAsSceneNode) { parentProperty.SetValue(valueAsSceneNode.DocumentNode); if (!valueAsSceneNode.TrueTargetType.IsClass) { return; } SceneNodePropertyCollection propertyCollection = (SceneNodePropertyCollection)parentProperty.get_PropertyValue().get_SubProperties(); propertyCollection.Rebuild(); if (((PropertyEntryCollection)propertyCollection).get_Count() <= 0 || !((SceneNodeProperty)this.PropertyValue.get_ParentProperty()).SceneNodeObjectSet.IsViewRepresentationValid) { return; } PropertyValueEditorCommands.get_ShowExtendedPinnedEditor().Execute(null, (IInputElement)this); }