Beispiel #1
0
        public void Unregister(IDrawable drawable)
        {
            ICollection <object> objects = drawable.GetObjects();

            foreach (object obj in objects)
            {
                UI.Children.Remove((UIElement)obj);
            }
        }
Beispiel #2
0
        public void Register(IDrawable drawable)
        {
            ICollection <object> objects = drawable.GetObjects();

            foreach (object obj in objects)
            {
                UIElement element = (UIElement)obj;
                if (!UI.Children.Contains(element))
                {
                    UI.Children.Add(element);
                }
            }
        }