public PopupGenericEditor(EditInterface editInterface, GuiFrameworkUICallback uiCallback, int width, int height)
            : base("Anomalous.GuiFramework.Editor.GUI.PopupGenericEditor.PopupGenericEditor.layout")
        {
            widget.setSize(width, height);

            propertiesScroll             = (ScrollView)widget.findWidget("PropertiesScroll");
            propertiesForm               = new ScrollingExpandingEditInterfaceViewer(propertiesScroll, uiCallback);
            propertiesForm.EditInterface = editInterface;
            propertiesForm.layout();
            propertiesForm.RootNode.expandChildren();

            Button close = (Button)widget.findWidget("Close");

            close.MouseButtonClick += close_MouseButtonClick;
        }
 void itemGrid_SelectedValueChanged(object sender, EventArgs e)
 {
     expandingView.EditInterface = ((AddItemTemplate)itemGrid.SelectedItem.UserObject).EditInterface;
     expandingView.layout();
 }