コード例 #1
0
        private ElementBindingSourceNode BuildTree(SceneElement element, BindingEditor bindingEditor)
        {
            ElementBindingSourceNode bindingSourceNode1 = new ElementBindingSourceNode(element, this.selectionContext);

            foreach (SceneNode sceneNode in element.GetAllContent())
            {
                BaseFrameworkElement frameworkElement = sceneNode as BaseFrameworkElement;
                if (frameworkElement != null)
                {
                    ElementBindingSourceNode bindingSourceNode2 = this.BuildTree((SceneElement)frameworkElement, bindingEditor);
                    if (bindingSourceNode2 != null)
                    {
                        bindingSourceNode1.AddChild((ElementNode)bindingSourceNode2);
                    }
                }
            }
            if (element.ViewModel.TimelineItemManager.SortByZOrder)
            {
                bindingSourceNode1.Children.Reverse();
            }
            if (bindingSourceNode1.Element is StyleNode)
            {
                bindingSourceNode1.IsSelectable = false;
            }
            return(bindingSourceNode1);
        }
コード例 #2
0
 private void ProcessContent(SceneElement node, ElementNode parent)
 {
     foreach (SceneNode sceneNode in node.GetAllContent())
     {
         BaseFrameworkElement frameworkElement = sceneNode as BaseFrameworkElement;
         if (frameworkElement != null)
         {
             parent.Children.Add(this.BuildElementNodeTree((SceneElement)frameworkElement, parent));
         }
         else
         {
             SceneElement node1 = sceneNode as SceneElement;
             if (node1 != null)
             {
                 this.ProcessContent(node1, parent);
             }
         }
     }
 }