private void propertyController_ObjectsSet(object sender, PropertyControllerEventArgs e) { AssertControllerExists(); propertyController.CancelSetProperty(); if (propertyController.Project != null && propertyController.Project.IsOpen) { StyleUITypeEditor.Project = propertyController.Project; } PropertyGrid grid = null; GetPropertyGrid(e.PageIndex, out grid); if (grid != null) { TypeDescriptionProviderDg.PropertyController = propertyController; if (e.Objects.Count > 0) { grid.SelectedObjects = e.GetObjectArray(); } else if (grid.SelectedObject != null) { grid.SelectedObject = null; } grid.Visible = true; } }
private void propertyController_RefreshObjects(object sender, PropertyControllerEventArgs e) { AssertControllerExists(); StyleUITypeEditor.Project = propertyController.Project; PropertyGrid grid = null; GetPropertyGrid(e.PageIndex, out grid); if (grid != null) { grid.SuspendLayout(); grid.Refresh(); grid.ResumeLayout(); } }
private void propertyController_RefreshObjects(object sender, PropertyControllerEventArgs e) { AssertControllerExists(); StyleUITypeEditor.Project = propertyController.Project; PropertyGrid grid = null; GetPropertyGrid(e.PageIndex, out grid); if (grid == null) { throw new IndexOutOfRangeException(string.Format("Property page {0} does not exist.", e.PageIndex)); } grid.SuspendLayout(); grid.Refresh(); grid.ResumeLayout(); }