예제 #1
0
 public CanvasCaret(ItemCanvas Screen)
 {
     this.Screen    = Screen;
     Screen.Odom   += 1;
     this.ObjectNum = Screen.Odom;
     CreateTextBlock();
 }
예제 #2
0
        public ItemCanvas FindChildCanvas(int contentNum)
        {
            ItemCanvas found = null;

            if (this.Children != null)
            {
                foreach (var child in this.Children)
                {
                    if (child.ContentNum == contentNum)
                    {
                        found = child;
                        break;
                    }
                }
            }
            return(found);
        }
예제 #3
0
        /// <summary>
        /// add the Child ItemCanvas to Children collection of this parent.
        /// </summary>
        /// <param name="Child"></param>
        public void AddChild(ItemCanvas Child)
        {
            // the child points up to this parent.
            Child.Parent = this;

            // add child to end of list of Children.
            if (this.Children == null)
            {
                this.Children    = new ItemCanvas[1];
                this.Children[0] = Child;
            }
            else
            {
                var childList = this.Children.ToList();
                childList.Add(Child);
                this.Children = childList.ToArray();
            }
        }