Exemplo n.º 1
0
        internal PropertyPathWalker(string path, bool isDatacontextBound)
        {
            _path = path;
            _isDataContextBound = isDatacontextBound;

            if (_isDataContextBound)
            {
                _firstNode = new DependencyPropertyNode(FrameworkElement.DataContextProperty);
            }

            ParsePath(_path, out IPropertyPathNode head, out IPropertyPathNode tail);

            if (_firstNode == null)
            {
                _firstNode = head ?? new StandardPropertyPathNode();
            }
            else
            {
                _firstNode.Next = head;
            }

            FinalNode = tail ?? _firstNode;

            FinalNode.Listen(this);
        }