Exemplo n.º 1
0
        /// <summary>
        /// Deregisters graphical element.
        /// </summary>
        public void Deregister(GraphicalElement element)
        {
            rootElements.Remove(element);

            element.HandleDeregistration();

            foreach (GraphicalElement child in element.Children.ToList())
            {
                Deregister(child);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Deregisters graphical element.
        /// </summary>
        public void Deregister(GraphicalElement element)
        {
            // Don't execute callback if element wasn't registered in a first place (or if Remove(element) was called twice).
            if (elements.Remove(element))
            {
                element.HandleDeregistration();
            }

            foreach (GraphicalElement child in element.Children.ToList())
            {
                Deregister(child);
            }
        }