Пример #1
0
            public TrackPathPropertyChangedAndUpdateReferences(ElementLookup lookup, ElementViewModel element)
            {
                this.lookup  = lookup;
                this.element = element;

                elementPropertyChangedHandler = new PropertyChangedEventHandler(element_PropertyChanged);
                this.element.PropertyChanged += elementPropertyChangedHandler;
            }
Пример #2
0
            public TrackChildElementCreationAndRemoval(ElementLookup lookup, ElementViewModel element)
            {
                this.lookup  = lookup;
                this.element = element;

                AddElements(element.ChildElements);

                childElementsChangedHandler            = new NotifyCollectionChangedEventHandler(ChildElements_CollectionChanged);
                element.ChildElementsCollectionChange += childElementsChangedHandler;
            }
Пример #3
0
            public ElementReferenceOverAbsolutePath(ElementLookup lookup, ElementViewModel element, string path)
                : base(lookup, element)
            {
                this.path = path;

                base.PathChanged += (sender, args) =>
                {
                    this.path = Element.Path;
                };
            }
Пример #4
0
            public ElementReferenceOverAncestorPath(ElementLookup lookup, ElementViewModel element, string ancestorPath, string elementName)
                : base(lookup, element)
            {
                this.ancestorPath = ancestorPath;
                this.elementName  = elementName;

                base.PathChanged += (sender, args) =>
                {
                    this.ancestorPath = Element.ParentElement.Path;
                    this.elementName  = GetElementNamePropertyValue(Element);
                };
            }
Пример #5
0
 public ElementChangeScope(ElementLookup lookup, Func <ElementViewModel, bool> predicate)
 {
     this.lookup    = lookup;
     this.predicate = predicate;
     this.lookup.CollectionChanged += lookup_CollectionChanged;
 }