/// <summary> /// Hide script slot fields on a property grid. /// </summary> /// <param name="innerGrid">The property grid.</param> protected void HideScriptSlots(PropertyGrid innerGrid) { PropertyEnumerator enumerator = innerGrid.FirstProperty; do { if (enumerator.Property != null && enumerator.Property.Name.StartsWith("On")) { innerGrid.DeleteProperty(enumerator); } else { enumerator.MoveNext(); } }while (enumerator != enumerator.RightBound); }