void WidgetCheckOver(GraphicObject go, MouseMoveEventArgs e) { Type tGo = go.GetType(); if (typeof(TemplatedGroup).IsAssignableFrom(tGo)) { } else if (typeof(TemplatedContainer).IsAssignableFrom(tGo)) { TemplatedContainer c = go as TemplatedContainer; if (c.Content?.MouseIsIn(e.Position) == true) { WidgetCheckOver(c.Content, e); return; } } else if (typeof(TemplatedControl).IsAssignableFrom(tGo)) { } else if (typeof(Group).IsAssignableFrom(tGo)) { Group c = go as Group; for (int i = c.Children.Count - 1; i >= 0; i--) { if (c.Children[i].MouseIsIn(e.Position)) { WidgetCheckOver(c.Children[i], e); return; } } } else if (typeof(Crow.Container).IsAssignableFrom(tGo)) { Crow.Container c = go as Crow.Container; if (c.Child?.MouseIsIn(e.Position) == true) { WidgetCheckOver(c.Child, e); return; } } HoverWidget = go; WidgetMouseEnter(go, e); }