コード例 #1
0
        public void RegisterAnchor(Region.Anchor anchor)
        {
            Region target = anchor.GetRelativeElement();
            Region source = anchor.GetElement();

            if (target == null)
            {
                // anchor off of the top level
                if (!topElements.Contains(source))
                    topElements.Add(source);
                return;
            }

            if (!anchorLinks.ContainsKey(target))
                anchorLinks[target] = new List<Region>();
            List<Region> sourceList = anchorLinks[target];
            if (!sourceList.Contains(source))
                sourceList.Add(source);
        }