Class PropertyGrid
Specialized grid for editing properties - in other words name = value pairs.
[ControlCategory("Other")]
public class PropertyGrid : Control, IBaseObject, IDisposableObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, INotifyDataErrorInfo, IPropertyGrid
- Inheritance
-
PropertyGrid
- Implements
Remarks
Example of how a PropertyGrid can look:
Fields
- TypeRegistry
Dictionary used to get type related information.
Properties
- AllChildrenInLayout
Gets all child controls which are visible and included in the layout.
- ApplyFlags
Gets or sets flags used when property value is applied back to object instance in default PropertyChanged event handler.
- BoolAsCheckBox
Gets or sets whether boolean properties will be shown as checkboxes. Default is
true
.
- CaptionBackgroundColor
Gets or sets category caption background color.
- CaptionForegroundColor
Gets or sets category caption text color.
- CellBackgroundColor
Gets or sets cell background color.
- CellDisabledTextColor
Gets or sets cell text color when disabled.
- CellTextColor
Gets or sets cell text color.
- ColorHasAlpha
Gets or sets whether Color properties have alpha chanel. Default is
true
.
- ControlKind
Returns control identifier.
- CreateStyle
Defines visual style and behavior of the PropertyGrid control.
- CreateStyleEx
Defines extended style of the PropertyGrid control.
- DefaultColorFormatRGB
Gets or sets default Color format when ColorHasAlpha is
false
.
- DefaultColorFormatRGBA
Gets or sets default Color format when ColorHasAlpha is
true
.
- DefaultCreateStyle
Defines default style for the newly created PropertyGrid controls.
- DefaultEditKindColor
Gets or sets default editor for Color.
- EmptySpaceColor
Gets or sets color of empty space below properties.
- EventColumn
Gets column index on which event is fired.
- EventPropName
Gets property name used in the event handler.
- EventPropValue
Gets property value used in the event handler.
- EventPropValueAsVariant
Gets property value used in the event handler as IPropertyGridVariant.
- EventProperty
Gets property used in the event handler.
- EventValidationFailureBehavior
Gets or sets validation failure behavior flags used in the event handler.
- EventValidationFailureMessage
Gets or sets validation failure message used in the event handler.
- Factory
Returns IPropertyGridFactory instance.
- Features
Gets or sets different PropertyGrid features.
- Handler
Gets control handler.
- HasBorder
Gets or sets a value indicating whether the control has a border.
- IgnorePropNames
Contains list of property names to ignore in AddProps(object?, IPropertyGridItem?, bool).
- Items
Gets list of IPropertyGridItem added to this control.
- LineColor
Gets or sets color of lines between cells.
- MarginColor
Gets or sets background color of margin.
- SelectionBackgroundColor
Gets or sets selection background color.
- SelectionForegroundColor
Gets or sets selection text color.
- StaticFlags
Gets or sets static states for PropertyGrid class.
Methods
- Add(IPropertyGridItem, IPropertyGridItem?)
Adds item to the property grid.
- AddActionTrigger(PropertyGridKeyboardAction, Key, ModifierKeys)
Adds new action trigger (keyboard key association).
- AddConstItem(string, string?, object?)
Adds constant item (readonly string).
- AddPropCategory(string, string?, IPropertyGridNewItemParams?)
Creates and adds properties category.
- AddProps(object?, IPropertyGridItem?, bool)
Adds all public properties of the specified object.
- AddRange(IEnumerable<IPropertyGridItem>, IPropertyGridItem?)
Adds items to the property grid.
- AddSimpleAction<T>(string, Action)
Adds simple action for the specified
T
.
- AddToSelection(IPropertyGridItem)
Adds given property into selection.
- AppendIn(IPropertyGridItem, IPropertyGridItem)
Appends property as a child of other property.
- ApplyColors(IPropertyGridColors?)
Sets all PropertyGrid colors.
- ApplyKnownColors(PropertyGridKnownColors)
Sets all PropertyGrid colors.
- AutoGetTranslation(bool)
Enables or disables automatic translation for enum list labels and flags child property labels.
- BackgroundToLineColor()
Changes lines color to the cell background color;
- BeginLabelEdit(int)
Creates label editor for given column, for property that is currently selected.
- CalcScrolledPositionD(PointD)
Translates the logical coordinates to the device ones.
- CalcScrolledPositionI(PointI)
Translates the logical coordinates to the device ones.
- CalcUnscrolledPositionD(PointD)
Translates the device coordinates to the logical ones.
- CalcUnscrolledPositionI(PointI)
Translates the device coordinates to the logical ones.
- CanResetProp(IPropertyGridItem?)
Gets whether property item can be reset.
- CenterSplitter(bool)
Centers the splitter.
- ChangePropertyValue(IPropertyGridItem, object)
Changes value of a property, as if from an editor.
- ChangePropertyValueAsVariant(IPropertyGridItem, IPropertyGridVariant)
Changes value of a property, as if from an editor.
- Clear()
Deletes all items from the property grid.
- ClearActionTriggers(PropertyGridKeyboardAction)
Removes added action triggers for the given action.
- ClearModifiedStatus()
Resets modified status of all properties.
- ClearSelection(bool)
Clears current selection, if any.
- Collapse(IPropertyGridItem?)
Collapses (hides) all sub properties of the given property.
- CollapseAll()
Collapses all items that can be collapsed. This functions clears selection.
- ColorToString(Color?)
Converts Color to string using ColorHasAlpha, DefaultColorFormatRGBA, DefaultColorFormatRGB properties
- ConstructNewItemParams(Type, PropertyInfo)
Gets "constructed" IPropertyGridNewItemParams for the given Type and PropertyInfo.
- CreateBoolItem(string, string?, bool, IPropertyGridNewItemParams?)
Creates bool property.
- CreateByteItem(string, string?, byte, IPropertyGridNewItemParams?)
Creates byte property.
- CreateCharItem(string, string?, char?, IPropertyGridNewItemParams?)
Creates char property.
- CreateChoices()
Creates property choices list for use with CreateFlagsItem(string, string?, IPropertyGridChoices, object?, IPropertyGridNewItemParams?) and CreateChoicesItem(string, string?, IPropertyGridChoices, object?, IPropertyGridNewItemParams?).
- CreateChoices(Type)
Creates property choices list for the given enumeration type.
- CreateChoicesItem(string, string?, IPropertyGridChoices, object?, IPropertyGridNewItemParams?)
Creates enumeration property.
- CreateChoicesOnce(Type)
Creates property choices list for the given enumeration type or returns it from the internal cache if it was previously created.
- CreateColorItem(string, string?, Color, IPropertyGridNewItemParams?)
Creates Color property.
- CreateColorItemWithKind(string, string?, Color, IPropertyGridNewItemParams?)
Creates Color property.
- CreateDirItem(string, string?, string?, IPropertyGridNewItemParams?)
Creates string property with ellipsis button which opens SelectDirectoryDialog when pressed.
- CreateDoubleItem(string, string?, double, IPropertyGridNewItemParams?)
Creates double property.
- CreateEditEnumItem(string, string?, IPropertyGridChoices, string?, IPropertyGridNewItemParams?)
Creates editable enumeration property.
- CreateFilenameItem(string, string?, string?, IPropertyGridNewItemParams?)
Creates string property with ellipsis button which opens FileDialog when pressed.
- CreateFlagsItem(string, string?, IPropertyGridChoices, object?, IPropertyGridNewItemParams?)
Creates flags property (like enumeration with Flags attribute).
- CreateFloatItem(string, string?, float, IPropertyGridNewItemParams?)
Creates float property.
- CreateHandler()
Creates a handler for the control.
- CreateImageFilenameItem(string, string?, string?, IPropertyGridNewItemParams?)
Creates string property with ellipsis button which opens FileDialog when pressed.
- CreateInt16Item(string, string?, short, IPropertyGridNewItemParams?)
Creates short property.
- CreateIntItem(string, string?, int, IPropertyGridNewItemParams?)
Creates int property.
- CreateLongItem(string, string?, long, IPropertyGridNewItemParams?)
Creates long property.
- CreateLongStringItem(string, string?, string?, IPropertyGridNewItemParams?)
Creates string property with additional edit dialog for entering long values.
- CreateNewItemParams(IPropertyGridPropInfoRegistry?, PropertyInfo?)
Creates default IPropertyGridNewItemParams provider.
- CreateNewItemParams(PropertyInfo?)
Creates new IPropertyGridNewItemParams instance.
- CreatePropCategory(string, string?, IPropertyGridNewItemParams?)
Creates properties category.
- CreateProperty(object, PropertyInfo)
Creates property using another object's property.
- CreateProperty(object, string)
Creates property using another object's property.
- CreateProperty(string?, string?, object, PropertyInfo)
Creates property using another object's property.
- CreateProperty(string?, string?, object, string)
Creates property using another object's property.
- CreatePropertyAsBool(string, string?, object, PropertyInfo)
Creates bool property.
- CreatePropertyAsBrush(string, string?, object, PropertyInfo)
Creates Brush property.
- CreatePropertyAsByte(string, string?, object, PropertyInfo)
Creates byte property.
- CreatePropertyAsChar(string, string?, object, PropertyInfo)
Creates char property.
- CreatePropertyAsColor(string?, string?, object, PropertyInfo)
Creates Color property.
- CreatePropertyAsDate(string, string?, object, PropertyInfo)
Creates DateTime property.
- CreatePropertyAsDecimal(string, string?, object, PropertyInfo)
Creates decimal property.
- CreatePropertyAsDouble(string, string?, object, PropertyInfo)
Creates double property.
- CreatePropertyAsEnum(string?, string?, object, PropertyInfo)
Creates enumeration property.
- CreatePropertyAsFloat(string, string?, object, PropertyInfo)
Creates float property.
- CreatePropertyAsFont(string, string?, object, PropertyInfo)
Creates Font property.
- CreatePropertyAsInt(string, string?, object, PropertyInfo)
Creates int property.
- CreatePropertyAsInt16(string, string?, object, PropertyInfo)
Creates short property.
- CreatePropertyAsLong(string, string, object, PropertyInfo)
Creates long property.
- CreatePropertyAsPen(string, string?, object, PropertyInfo)
Creates Pen property.
- CreatePropertyAsSByte(string, string?, object, PropertyInfo)
Creates sbyte property.
- CreatePropertyAsString(string, string?, object, PropertyInfo)
Creates string property.
- CreatePropertyAsStruct(string, string?, object, PropertyInfo)
Creates property for structures.
- CreatePropertyAsUInt(string, string?, object, PropertyInfo)
Creates uint property.
- CreatePropertyAsUInt16(string, string?, object, PropertyInfo)
Creates ushort property.
- CreatePropertyAsULong(string, string?, object, PropertyInfo)
Creates ulong property.
- CreatePropertyGrid()
Creates new IPropertyGrid instance.
- CreatePropertyWithAdapter(string, string?, PropertyGridAdapterGeneric)
Create complex property with sub-properties using PropertyGridAdapterGeneric instance as child properties provider.
- CreateProps(object, bool)
Creates IPropertyGridItem array from all public properties of the specified object.
- CreateSByteItem(string, string?, sbyte, IPropertyGridNewItemParams?)
Creates sbyte property.
- CreateStringItemWithKind(string, string?, string?, IPropertyGridNewItemParams?)
Creates string property.
- CreateSystemColorItem(string, string?, Color, IPropertyGridNewItemParams?)
Creates Color property with system colors.
- CreateUInt16Item(string, string?, ushort, IPropertyGridNewItemParams?)
Creates ushort property.
- CreateUIntItem(string, string?, uint, IPropertyGridNewItemParams?)
Creates uint property.
- CreateULongItem(string, string?, ulong, IPropertyGridNewItemParams?)
Creates ulong property.
- CreateVar()
Creates new variant instance for use with PropertyGrid
- CreateVariant()
Creates new IPropertyGridVariant instance.
- DedicateKey(Key)
Dedicates a specific keycode to PropertyGrid. This means that such key presses will not be redirected to editor controls.
- DisableProperty(IPropertyGridItem)
Disables property.
- DoActionOnProperties<T>(IEnumerable<IPropertyGridItem>, Action<IPropertyGridItem, T>, T, bool)
Executes specified action for all property items in
props
collection.
- DoActionOnProperties<T1, T2>(IEnumerable<IPropertyGridItem>, Action<IPropertyGridItem, T1, T2>, T1, T2, bool)
Executes specified action for all property items in
props
collection.
- EditorValidate()
Returns true if all property grid data changes have been committed.
- EditorsValueWasModified()
Call when editor widget's contents is modified.
- EnableCategories(bool)
Enables or disables (shows/hides) categories according to parameter enable.
- EnableProperty(IPropertyGridItem?, bool)
Changes enabled state of the property.
- EndLabelEdit(bool)
Ends label editing, if any.
- EndUpdate()
Resumes painting the control after painting is suspended by the BeginUpdate() method.
- EnsureVisible(IPropertyGridItem)
Scrolls and/or expands items to ensure that the given item is visible.
- Expand(IPropertyGridItem?)
Expands (shows) all sub properties of the given property.
- ExpandAll(bool)
Expands all items that can be expanded. This functions clears selection.
- FitColumns()
Reduces column sizes to minimum possible, while still retaining fully visible grid contents (labels, images).
- GetCategories()
Gets all added property categories.
- GetChoices<T>()
Returns IPropertyGridChoices for the given enumeration type.
- GetColumnCount()
Gets number of columns currently on grid.
- GetColumnProportion(int)
Gets auto-resize proportion of the given column.
- GetCommonValueCount()
Gets number of common values.
- GetCommonValueLabel(int)
Gets label of given common value.
- GetCurrentColors()
Creates IPropertyGridColors with current colors of the PropertyGrid.
- GetCustomLabel<T>(string)
Gets custom label for the given Type and PropertyInfo.
- GetFirst(PropertyGridIteratorFlags)
Gets first property item which satisfies search criteria specified by
flags
.
- GetFirstChild(IPropertyGridItem?)
Gets first child of the property item.
- GetFontHeight()
Gets height of highest characters of used font.
- GetHitTestColumn(PointD)
Returns column information about arbitrary position in the grid.
- GetHitTestProp(PointD)
Returns property information about arbitrary position in the grid.
- GetImageRect(IPropertyGridItem, int)
Returns rectangle of custom paint image.
- GetImageSize(IPropertyGridItem?, int)
Returns size of the custom paint image in front of property.
- GetItemsFiltered(object?, PropertyInfo?)
Gets IPropertyGridItem added to the control filtered by Instance (
instance
param) and PropInfo (propInfo
param).
- GetLastItem(PropertyGridIteratorFlags)
Returns last item which could be iterated using given flags.
- GetListEditSourceType(Type?, PropertyInfo?)
Gets type of the registered list editor source for the specified
type
andpropInfo
. This is used in list editor dialog.
- GetMarginWidth()
Gets margin width.
- GetNewItemParams(Type, PropertyInfo)
Gets IPropertyGridNewItemParams for the given Type and PropertyInfo.
- GetNewItemParams(Type, string)
Gets IPropertyGridNewItemParams for the given Type and property name.
- GetPropChoices(object, string)
Returns IPropertyGridChoices for the specified
instance
andpropName
.
- GetPropNameAsLabel()
Gets special property name which means to use label as property name.
- GetPropRegistry(Type, PropertyInfo)
Gets IPropertyGridPropInfoRegistry for the given Type and PropertyInfo.
- GetProperty(string?)
Gets property item with the specified
name
.
- GetPropertyBackgroundColor(IPropertyGridItem)
Gets background color of first cell of a property.
- GetPropertyByLabel(string?)
Gets property item with the specified
label
.
- GetPropertyByName(string?)
Gets property item with the specified
name
.
- GetPropertyByNameAndSubName(string?, string?)
Gets property item with the specified
name
andsubname
.
- GetPropertyCategory(IPropertyGridItem?)
Gets category of the property item.
- GetPropertyClientData(IPropertyGridItem)
Gets client data associated with the property.
- GetPropertyHelpString(IPropertyGridItem)
Gets help string associated with the property.
- GetPropertyLabel(IPropertyGridItem)
Gets label associated with the property.
- GetPropertyName(IPropertyGridItem)
Gets property name of the IPropertyGridItem.
- GetPropertyParent(IPropertyGridItem?)
Gets parent of the property item.
- GetPropertyTextColor(IPropertyGridItem)
Returns text color of first cell of a property.
- GetPropertyValueAsBool(IPropertyGridItem)
Gets property value as bool.
- GetPropertyValueAsDateTime(IPropertyGridItem)
Gets property value as DateTime.
- GetPropertyValueAsDouble(IPropertyGridItem)
Gets property value as double.
- GetPropertyValueAsInt(IPropertyGridItem)
Gets property value as int.
- GetPropertyValueAsLong(IPropertyGridItem)
Gets property value as long.
- GetPropertyValueAsString(IPropertyGridItem)
Gets property value as string.
- GetPropertyValueAsULong(IPropertyGridItem)
Gets property value as ulong.
- GetPropertyValueAsVariant(IPropertyGridItem)
Gets property value as IPropertyGridVariant.
- GetRoot()
Returns "root property".
- GetRowHeight()
Gets height of a single grid row (in pixels).
- GetSelectedProperty()
Gets currently selected property.
- GetSelection()
Gets selected property item.
- GetSimpleActions(Type)
Gets list of simple actions or
null
if there are no actions.
- GetSpacingY()
Gets current Y spacing.
- GetSplitterPosition(int)
Gets current splitter x position.
- GetTypeRegistry(Type)
Gets IPropertyGridTypeRegistry for the given Type.
- GetTypeRegistryOrNull(Type)
Gets IPropertyGridTypeRegistry for the given Type if its available, othewise returns
null
.
- GetUnspecifiedCommonValue()
Gets index of common value that will truly change value to unspecified.
- GetUnspecifiedValueText(PropertyGridValueFormatFlags)
Returns (visual) text representation of the unspecified property value.
- GetValidBasePropRegistry(Type?, PropertyInfo?, Func<IPropertyGridPropInfoRegistry, bool>)
Gets IPropertyGridPropInfoRegistry item for the specified
type
andpropInfo
. Uses validator functions to check whether results is ok.
- GetVerticalSpacing()
Gets current vertical spacing.
- HandleToItem(PropertyGridItemHandle)
Gets IPropertyGridItem from the item handler.
- HasVirtualWidth()
Gets whether control has virtual width specified with SetVirtualWidth(int).
- HideProperty(IPropertyGridItem, bool, bool)
Hides or shows property.
- InitAllTypeHandlers()
Registers all type handlers for use in PropertyGrid.
- Insert(IPropertyGridItem, IPropertyGridItem)
Inserts property before another property.
- InsertAt(IPropertyGridItem, int, IPropertyGridItem)
Inserts property in parent property at specified index.
- IsAnyModified()
Gets whether any property has been modified by the user.
- IsEditorFocused()
Gets whether a property editor control has focus.
- IsEditorsValueModified()
Gets whether editor's value was marked modified.
- IsPropertyCategory(IPropertyGridItem)
Gets whether property is category.
- IsPropertyEnabled(IPropertyGridItem)
Gets whether property is enabled.
- IsPropertyExpanded(IPropertyGridItem)
Gets whether property is expanded.
- IsPropertyModified(IPropertyGridItem)
Gets whether property is modified.
- IsPropertySelected(IPropertyGridItem)
Gets whether property is selected.
- IsPropertyShown(IPropertyGridItem)
Gets whether property is shown.
- IsPropertyValueUnspecified(IPropertyGridItem)
Gets whether property value is unspecified.
- IsSmallScreen()
Checks system screen design used for laying out various dialogs.
- LimitPropertyEditing(IPropertyGridItem, bool)
Disables (limit = true) or enables (limit = false) text editor of a property, if it is not the sole mean to edit the value.
- MakeColumnEditable(int, bool)
Makes given column editable by user.
- OnButtonClick(EventArgs)
Called when button is clicked in the property editor and it is not processed by default.
- OnColBeginDrag(CancelEventArgs)
Called when user starts resizing a column.
- OnColDragging(EventArgs)
Called when a column resize by the user is in progress.
- OnColEndDrag(EventArgs)
Called after column resize by the user has finished.
- OnItemCollapsed(EventArgs)
Called when user collapses a property or category.
- OnItemExpanded(EventArgs)
Called when user expands a property or category.
- OnLabelEditBegin(CancelEventArgs)
Called when user is about to begin editing a property label.
- OnLabelEditEnding(CancelEventArgs)
Called when user is about to end editing of a property label.
- OnLayout()
Called when the control should reposition its child controls.
- OnPropertyChanged(EventArgs)
Called when property value has been changed by the user.
- OnPropertyChanging(CancelEventArgs)
Called when property value is about to be changed by the user.
- OnPropertyCreated(IPropertyGridItem, IPropertyGridNewItemParams?)
Called after IPropertyGridItem created.
- OnPropertyCreated(IPropertyGridItem, object, PropertyInfo, IPropertyGridNewItemParams?)
Called after IPropertyGridItem created for the specified
instance
andpropInfo
.
- OnPropertyDoubleClick(EventArgs)
Called when property is double-clicked with left mouse button.
- OnPropertyHighlighted(EventArgs)
Called when mouse moves over a property.
- OnPropertyRightClick(EventArgs)
Called when property is clicked with right mouse button.
- OnPropertySelected(EventArgs)
Called when a property selection has been changed, either by user action or by indirect program function.
- RaiseButtonClick(EventArgs)
Raises ButtonClick event and OnButtonClick(EventArgs) method.
- RaiseColBeginDrag(CancelEventArgs)
Raises ColBeginDrag event and OnColBeginDrag(CancelEventArgs) method.
- RaiseColDragging(EventArgs)
Raises ColDragging event and OnColDragging(EventArgs) method.
- RaiseColEndDrag(EventArgs)
Raises ColEndDrag event and OnColEndDrag(EventArgs) method.
- RaiseItemCollapsed(EventArgs)
Raises ItemCollapsed event and OnItemCollapsed(EventArgs) method.
- RaiseItemExpanded(EventArgs)
Raises ItemExpanded event and OnItemExpanded(EventArgs) method.
- RaiseLabelEditBegin(CancelEventArgs)
Raises LabelEditBegin event and OnLabelEditBegin(CancelEventArgs) method.
- RaiseLabelEditEnding(CancelEventArgs)
Raises LabelEditEnding event and OnLabelEditEnding(CancelEventArgs) method.
- RaisePropertyChanged(EventArgs)
Raises PropertyChanged event and OnPropertyChanged(EventArgs) method.
- RaisePropertyChanging(CancelEventArgs)
Raises PropertyChanging event and OnPropertyChanging(CancelEventArgs) method.
- RaisePropertyDoubleClick(EventArgs)
Raises PropertyDoubleClick event and OnPropertyDoubleClick(EventArgs) method.
- RaisePropertyHighlighted(EventArgs)
Raises PropertyHighlighted event and OnPropertyHighlighted(EventArgs) method.
- RaisePropertyRightClick(EventArgs)
Raises PropertyRightClick event and OnPropertyRightClick(EventArgs) method.
- RaisePropertySelected(EventArgs)
Raises PropertySelected event and OnPropertySelected(EventArgs) method.
- RefreshEditor()
Refreshes any active editor control.
- RefreshProperty(IPropertyGridItem)
Redraws given property.
- RegisterAdditionalEditors()
Registers additional editors for use in PropertyGrid.
- RegisterCollectionEditor(Type, string, Type?)
Registers collection editor for the specified property of the class.
- RegisterCollectionEditors()
Register collection editors for all controls.
- RegisterPropCreateFunc(Type, PropertyGridItemCreate)
Registers IPropertyGridItem create function for specific Type.
- ReloadPropertyValue(IPropertyGridItem)
Reloads value of the IPropertyGridItem item if it is attached to the external object (Instance and PropInfo) are not null.
- ReloadPropertyValues(object?, PropertyInfo?)
Reloads values of all IPropertyGridItem items collected with GetItemsFiltered(object?, PropertyInfo?).
- RemoveFromSelection(IPropertyGridItem)
Removes given property from selection.
- RemoveProperty(IPropertyGridItem?)
Removes property from the PropertyGrid.
- ReplaceProperty(IPropertyGridItem, IPropertyGridItem)
Replaces existing property with newly created property.
- ResetColors()
Resets all colors used in PropertyGrid to default values.
- ResetColumnSizes(bool)
Resets column sizes and splitter positions, based on proportions.
- ResetProp(IPropertyGridItem?)
Resets property item value.
- RestoreEditableState(string, PropertyGridEditableState)
Restores user-editable state.
- SaveEditableState(PropertyGridEditableState)
Used to acquire user-editable state (selected property, expanded properties, scrolled position, splitter positions).
- SelectProperty(IPropertyGridItem, bool)
Selects a property.
- SetBoolChoices(string, string)
Sets string constants for
true
andfalse
words used in bool properties.
- SetCategoriesBackgroundColor(Color)
Sets background color for all added property categories.
- SetColumnCount(int)
Sets number of columns (2 or more).
- SetColumnProportion(int, int)
Sets proportion of an auto-stretchable column.
- SetCurrentCategory(IPropertyGridItem)
Sets the 'current' category - Add(IPropertyGridItem, IPropertyGridItem?) will add non-category properties under it.
- SetCustomLabel<T>(string, string)
Sets custom label for the property.
- SetPropertiesBackgroundColor(IEnumerable<IPropertyGridItem>, Color)
Sets background color for all properties in
items
collection.
- SetPropertyAttribute(IPropertyGridItem, string, object?, PropertyGridItemValueFlags)
Sets an attribute for the property.
- SetPropertyAttributeAll(string, IPropertyGridVariant)
Sets an attribute for all the properties.
- SetPropertyAttributeAll(string, object)
Sets an attribute for all the properties.
- SetPropertyAttributeAsVariant(IPropertyGridItem, string, IPropertyGridVariant, PropertyGridItemValueFlags)
Sets an attribute for the property.
- SetPropertyBackgroundColor(IPropertyGridItem, Color, bool)
Sets background colour of a property.
- SetPropertyClientData(IPropertyGridItem, IntPtr)
Sets client data of a property.
- SetPropertyColorsToDefault(IPropertyGridItem, bool)
Resets text and background colors of a property.
- SetPropertyEditorByKnownName(IPropertyGridItem, PropertyGridKnownEditors)
Sets editor control of a property using its known name.
- SetPropertyEditorByName(IPropertyGridItem, string)
Sets editor control of a property using its name.
- SetPropertyFlag(IPropertyGridItem, PropertyGridItemFlags, bool)
Sets flag value for the specified property.
- SetPropertyHelpString(IPropertyGridItem, string)
Sets help string of a property.
- SetPropertyImage(IPropertyGridItem, ImageSet?)
Sets image associated with the property.
- SetPropertyKnownAttribute(IPropertyGridItem, PropertyGridItemAttrId, object?, PropertyGridItemValueFlags)
Sets known attribute for the property.
- SetPropertyLabel(IPropertyGridItem, string)
Sets label of a property.
- SetPropertyMaxLength(IPropertyGridItem, int)
Sets maximum length of text in property text editor.
- SetPropertyMinMax(IPropertyGridItem, object?, object?)
Sets minimal and maximal values of the numeric property.
- SetPropertyMinMax(IPropertyGridItem, TypeCode)
Sets minimal and maximal values of the numeric property.
- SetPropertyReadOnly(IPropertyGridItem, bool, bool)
Sets property readonly flag.
- SetPropertyTextColor(IPropertyGridItem, Color, bool)
Sets text colour of a property.
- SetPropertyValidator(IPropertyGridItem, IValueValidator)
Sets validator of a property.
- SetPropertyValueAsBool(IPropertyGridItem, bool)
Sets property value as bool.
- SetPropertyValueAsDateTime(IPropertyGridItem, DateTime)
Sets property value as DateTime.
- SetPropertyValueAsDouble(IPropertyGridItem, double)
Sets property value as double.
- SetPropertyValueAsInt(IPropertyGridItem, int)
Sets property value as int.
- SetPropertyValueAsLong(IPropertyGridItem, long)
Sets property value as long.
- SetPropertyValueAsStr(IPropertyGridItem, string)
Sets property value as string.
- SetPropertyValueAsVariant(IPropertyGridItem, IPropertyGridVariant)
Sets property value as variant.
- SetPropertyValueUnspecified(IPropertyGridItem)
Allows property value to be unspecified.
- SetProps(object?, bool)
Clears properties and calls AddProps(object?, IPropertyGridItem?, bool) afterwards.
- SetSplitterLeft(bool)
Moves splitter as left as possible, while still allowing all labels to be shown in full.
- SetSplitterPosition(int, int)
Sets x coordinate of the splitter.
- SetUnspecifiedCommonValue(int)
Sets index of common value that will truly change value to unspecified.
- SetValidationFailureBehavior(PropertyGridValidationFailure)
Adjusts how PropertyGrid behaves when invalid value is entered in a property.
- SetVerticalSpacing(int?)
Sets vertical spacing.
- SetVirtualWidth(int)
Set virtual width for this particular page.
- ShowEllipsisButton(Type, string, bool)
Shows or hides ellipsis button in the property editor.
- Sort(bool)
Sorts properties.
- SortChildren(IPropertyGridItem, bool)
Sorts children of a property.
- SuggestedInitDefaults()
Initializes control with suggested defaults.
- UnfocusEditor()
Unfocuses or closes editor if one was open, but does not deselect property.
- WasValueChangedInEvent()
You can use this function, for instance, to detect in events if property's SetValueInEvent was already called in editor's event handler.
Events
- ButtonClick
Occurs when button is clicked in the property editor.
- ColBeginDrag
Occurs when user starts resizing a column.
- ColDragging
Occurs when a column resize by the user is in progress. This event is also generated when user double-clicks the splitter in order to recenter it.
- ColEndDrag
Occurs after column resize by the user has finished.
- EditWithListEdit
Occurs when collection editor is called in the property grid.
- ItemCollapsed
Occurs when user collapses a property or category.
- ItemExpanded
Occurs when user expands a property or category.
- LabelEditBegin
Occurs when user is about to begin editing a property label.
- LabelEditEnding
Occurs when user is about to end editing of a property label.
- PropertyChanged
Occurs when property value has been changed by the user.
- PropertyChanging
Occurs when property value is about to be changed by the user.
- PropertyCustomCreate
Occurs when new property item is created.
- PropertyDoubleClick
Occurs when property is double-clicked with left mouse button.
- PropertyHighlighted
Occurs when mouse moves over a property.
- PropertyRightClick
Occurs when property is clicked with right mouse button.
- PropertySelected
Occurs when a property selection has been changed, either by user action or by indirect program function.