Beispiel #1
0
 internal static XamlNode GetValue(XamlDomValue XamlDomValue)
 {
     _xamlNode.Clear();
     _xamlNode.NodeType     = XamlNodeType.Value;
     _xamlNode.Value        = XamlDomValue.Value;
     _xamlNode.LineNumber   = XamlDomValue.StartLineNumber;
     _xamlNode.LinePosition = XamlDomValue.StartLinePosition;
     return(_xamlNode);
 }
Beispiel #2
0
        public XamlDomMember(Type declaringType, string attachedMember, object value)
        {
            if (attachedMember == null)
            {
                throw new ArgumentNullException("attachedMember");
            }

            _unresolvedDeclaringType = declaringType;
            _unresolvedMemberName    = attachedMember;

            Item = new XamlDomValue(value);
        }
        public override void WriteValue(object value)
        {
            var valueNode = new XamlDomValue();

            valueNode.Value = value;

            if (RootNode != null)
            {
                //text should always be inside of a property...
                var propertyNode = (XamlDomMember)writerStack.Peek();
                propertyNode.Items.Add(valueNode);
            }
            else
            {
                RootNode = valueNode;
            }

            valueNode.StartLineNumber   = _lineNumber;
            valueNode.StartLinePosition = _linePosition;
            valueNode.EndLineNumber     = _lineNumber;
            valueNode.EndLinePosition   = _linePosition;
        }
Beispiel #4
0
        public override void WriteValue(object value)
        {
            var valueNode = new XamlDomValue();
            valueNode.Value = value;

            if (RootNode != null)
            {
                //text should always be inside of a property...
                var propertyNode = (XamlDomMember) writerStack.Peek();
                propertyNode.Items.Add(valueNode);
            }
            else
            {
                RootNode = valueNode;
            }

            valueNode.StartLineNumber = _lineNumber;
            valueNode.StartLinePosition = _linePosition;
            valueNode.EndLineNumber = _lineNumber;
            valueNode.EndLinePosition = _linePosition;
        }
Beispiel #5
0
 internal static XamlNode GetValue(XamlDomValue XamlDomValue)
 {
     _xamlNode.Clear();
     _xamlNode.NodeType = XamlNodeType.Value;
     _xamlNode.Value = XamlDomValue.Value;
     _xamlNode.LineNumber = XamlDomValue.StartLineNumber;
     _xamlNode.LinePosition = XamlDomValue.StartLinePosition;
     return _xamlNode;
 }
Beispiel #6
0
 private IEnumerable<XamlNode> ReadValueNode(XamlDomValue XamlDomValue)
 {
     yield return XamlNode.GetValue(XamlDomValue);
 }
Beispiel #7
0
 public XamlDomMember(XamlMember xamlMember, object value)
     : this(xamlMember)
 {
     Item = new XamlDomValue(value);
     Resolve();
 }
Beispiel #8
0
        public XamlDomMember(Type declaringType, string attachedMember, object value)
        {
            if (attachedMember == null)
            {
                throw new ArgumentNullException("attachedMember");
            }

            _unresolvedDeclaringType = declaringType;
            _unresolvedMemberName = attachedMember;

            Item = new XamlDomValue(value);
        }
Beispiel #9
0
 private IEnumerable <XamlNode> ReadValueNode(XamlDomValue XamlDomValue)
 {
     yield return(XamlNode.GetValue(XamlDomValue));
 }
Beispiel #10
0
 public XamlDomMember(XamlMember xamlMember, object value)
     : this(xamlMember)
 {
     Item = new XamlDomValue(value);
     Resolve();
 }