void m_selectionContext_SelectionChanged(object sender, EventArgs e) { IEnumerable <DomNode> domNodes = m_selectionContext.Selection.AsIEnumerable <DomNode>(); IEnumerable <DomNode> roots = DomNode.GetRoots(domNodes); IEnumerable <NativeObjectAdapter> nativeObjects = roots.AsIEnumerable <NativeObjectAdapter>(); GameEngine.SetSelection(nativeObjects); InvalidateViews(); }