Example #1
0
        public void ParseElements(ISvgEventCaller caller, SvgElement element)
        {
            //register events
            if(element.HasNonEmptyCustomAttribute("onclick"))
            {
                element.RegisterEvents(caller);
                element.Click += child_Click;
            }

            //gather color relevant elements
            if(element.HasNonEmptyCustomAttribute("class"))
            {
                if(element.CustomAttributes["class"] == "widgetback")
                    if(element is SvgVisualElement)
                        BackgroundElements.Add(element as SvgVisualElement);
                else if(element.CustomAttributes["class"] == "widgetfore")
                    if(element is SvgVisualElement)
                        ForegroundElements.Add(element as SvgVisualElement);
            }

            foreach (var child in element.Children)
            {
                ParseElements(caller, child);
            }
        }