public override bool Equals(object obj)
        {
            PropertySceneInsertionPoint sceneInsertionPoint = obj as PropertySceneInsertionPoint;

            if (sceneInsertionPoint != null && this.sceneViewModel == sceneInsertionPoint.sceneViewModel && object.Equals((object)this.nodePath, (object)sceneInsertionPoint.nodePath))
            {
                return(object.Equals((object)this.targetProperty, (object)sceneInsertionPoint.targetProperty));
            }
            return(false);
        }
        public bool CanInsert(ITypeId typeToInsert)
        {
            IType typeToInsert1 = this.SceneNode.ProjectContext.ResolveType(typeToInsert);

            if (typeToInsert1 != null)
            {
                return(PropertySceneInsertionPoint.IsTypeCompatible(this.SceneNode, typeToInsert1, this.Property));
            }
            return(false);
        }
        public void Insert(SceneNode nodeToInsert)
        {
            ISceneNodeCollection <SceneNode> collectionForProperty = this.SceneNode.GetCollectionForProperty((IPropertyId)this.Property);

            if (collectionForProperty.FixedCapacity.HasValue && collectionForProperty.Count >= collectionForProperty.FixedCapacity.Value)
            {
                PropertySceneInsertionPoint.Cleanup(collectionForProperty[collectionForProperty.Count - 1]);
            }
            collectionForProperty.Add(nodeToInsert);
            ControlTemplateElement controlTemplateElement = this.SceneNode as ControlTemplateElement;

            if (controlTemplateElement == null)
            {
                return;
            }
            ITypeId templateTargetTypeId = controlTemplateElement.ControlTemplateTargetTypeId;

            VisualStateManagerSceneNode.AddDefaultStates(nodeToInsert, (SceneNode)controlTemplateElement, templateTargetTypeId);
        }
 public PropertySceneInsertionPointMarker(PropertySceneInsertionPoint insertionPoint)
 {
     this.marker   = insertionPoint.SceneNode.DocumentNode.Marker;
     this.property = insertionPoint.Property;
 }