Ejemplo n.º 1
0
        public override void InitFrom(AbstractNode source, Expanded expanded)
        {
            if (!(source is PropertyNode))
            {
                throw new InvalidOperationException("PropertyNodeViewModel must initialize from PropertyNode");
            }

            PropertyNode sourcePropertyNode = source as PropertyNode;

            this.Name = sourcePropertyNode.Property.Name;
            // Important to set Text here, as we might be just building new view over existing (evaluated) model.
            // Evaluated also in Evaluate() if needed.
            this.Text               = sourcePropertyNode.Property.Value;
            this.IsNested           = false;
            this.IsExpanded         = false;                            // always false, property content nodes are never expanded
            this.positionedProperty = new PositionedNodeProperty(
                sourcePropertyNode.Property, this.ContainingNode,
                expanded.Expressions.IsExpanded(sourcePropertyNode.Property.Expression));
        }
		protected virtual void OnPropertyCollapsed(PositionedNodeProperty property)
		{
			if (this.PropertyCollapsed != null)
				this.PropertyCollapsed(this, new PositionedPropertyEventArgs(property));
		}
		public PositionedPropertyEventArgs(PositionedNodeProperty property)
		{
			this.property = property;
		}
 public PositionedPropertyEventArgs(PositionedNodeProperty property)
 {
     this.property = property;
 }