示例#1
0
        private void UpdateHandlers(PropertyValue oldPropertyValue, PropertyValue newPropertyValue)
        {
            if (oldPropertyValue != null)
            {
                SceneNodeProperty sceneNodeProperty = oldPropertyValue.get_ParentProperty() as SceneNodeProperty;
                if (sceneNodeProperty != null)
                {
                    sceneNodeProperty.PropertyReferenceChanged -= new Microsoft.Expression.DesignSurface.Documents.PropertyReferenceChangedEventHandler(this.OnPropertyPropertyReferenceChanged);
                    sceneNodeProperty.remove_PropertyChanged(new PropertyChangedEventHandler(this.OnPropertyPropertyChanged));
                    this.ChangeActiveEditMode((PropertyContainerEditMode)0);
                }
            }
            if (newPropertyValue == null)
            {
                return;
            }
            SceneNodeProperty sceneNodeProperty1 = newPropertyValue.get_ParentProperty() as SceneNodeProperty;

            if (sceneNodeProperty1 == null)
            {
                return;
            }
            sceneNodeProperty1.PropertyReferenceChanged += new Microsoft.Expression.DesignSurface.Documents.PropertyReferenceChangedEventHandler(this.OnPropertyPropertyReferenceChanged);
            sceneNodeProperty1.add_PropertyChanged(new PropertyChangedEventHandler(this.OnPropertyPropertyChanged));
        }