private void btnEditSchema_Click(object sender, EventArgs e) { CustomPropertySchemaEditor schemaEditor = new CustomPropertySchemaEditor(_schema); schemaEditor.ShowDialog(); schemaEditor.Dispose(); propertyGrid.SelectedObject = new CustomPropertyBag(_schema, _properties, _showPropertiesThatApplyTo); }