Esempio n. 1
0
        //-----------------------------------------------------------------------
        public XmlDataModel(Workspace workspace, Document document, UndoRedoManager undoRedo)
        {
            this.Document  = document;
            this.Workspace = workspace;
            this.UndoRedo  = undoRedo;

            m_proxyRootItem = new DummyItem("   ⌂ ", this);
            GraphNodeItems  = new ObservableCollection <GraphNodeItem>();
            RootItems       = new ObservableCollection <DataItem>();

            GraphCommentItems.CollectionChanged += (obj, args) =>
            {
                RaisePropertyChangedEvent("GraphComments");
            };
        }
        //-----------------------------------------------------------------------
        public void FocusAttributes()
        {
            if (IsInFocus())
            {
                return;
            }

            var container = new DummyItem("Attributes", DataModel);

            container.Parent = this;

            foreach (var att in Attributes)
            {
                container.Children.Add(att);
            }

            DataModel.Selected = new List <DataItem>()
            {
                container
            };
        }