Table of Contents

Interface IPropertyGridHandler

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Contains methods and properties which allow to work with property grid control.

public interface IPropertyGridHandler : IControlHandler, IDisposableObject, IDisposable

Properties

CreateStyle

Defines visual style and behavior of the PropertyGrid control.

CreateStyleEx

Defines extended style of the PropertyGrid control.

EventColumn

Gets target column index. Valid only in the event handler.

EventPropValueAsVariant

Gets target property value as variant. Valid only in the event handler.

EventProperty

Gets target item. Valid only in the event handler.

EventPropertyName

Gets target property name. Valid only in the event handler.

EventValidationFailureBehavior

Gets or sets validation failure behavior. Valid only in the event handler.

EventValidationFailureMessage

Gets or sets validation failure message. Valid only in the event handler.

HasBorder

Gets or sets a value indicating whether the control has a border.

Methods

AddActionTrigger(PropertyGridKeyboardAction, Key, ModifierKeys)

Adds new action trigger (keyboard key association).

AddToSelection(IPropertyGridItem)

Adds given property into selection.

Append(IPropertyGridItem)

Appends item to the end of the items.

AppendIn(IPropertyGridItem, IPropertyGridItem)

Appends property as a child of other property.

AutoGetTranslation(bool)

Enables or disables automatic translation for enum list labels and flags child property labels.

BeginAddChildren(IPropertyGridItem)

Starts adding children for the specified item.

BeginLabelEdit(int)

Creates label editor for given column, for property that is currently selected.

CalcScrolledPosition(PointI)

Calculates scrolled position.

CalcUnscrolledPosition(PointI)

Calculates unscrolled position.

CenterSplitter(bool)

Centers the splitter.

ChangePropertyValue(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.

CommitChangesFromEditor(PropertyGridSelectPropFlags)

Commin changes from editor.

CreateBoolProperty(string, string, bool)

Creates boolean property.

CreateColorProperty(string, string, Color)

Creates color property.

CreateCursorProperty(string, string, int)

Creates cursor property.

CreateDateProperty(string, string, DateTime)

Creates date/time property.

CreateDirProperty(string, string, string)

Creates directory property.

CreateEditEnumProperty(string, string, IPropertyGridChoices, string)

Creates editable enum property.

CreateEnumProperty(string, string, IPropertyGridChoices, int)

Creates enum property.

CreateFilenameProperty(string, string, string)

Creates filename property.

CreateFlagsProperty(string, string, IPropertyGridChoices, int)

Creates flags property.

CreateFloatProperty(string, string, double)

Creates float property.

CreateImageFilenameProperty(string, string, string)

Creates image filename property.

CreateIntProperty(string, string, long)

Creates integer property.

CreateLongStringProperty(string, string, string)

Creates long string property.

CreatePropCategory(string, string)

Creates property category.

CreateStringProperty(string, string, string)

Creates string property.

CreateSystemColorProperty(string, string, Color)

Creates system color property.

CreateUIntProperty(string, string, ulong)

Creates unsigned integer property.

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.

DeleteProperty(IPropertyGridItem)
DisableProperty(IPropertyGridItem)

Disables property.

EditorValidate()

Returns true if all property grid data changes have been committed.

EditorsValueWasModified()

Call when editor widget's contents is modified.

EditorsValueWasNotModified()

Reverse of EditorsValueWasModified().

EnableCategories(bool)

Enables or disables (shows/hides) categories according to parameter enable.

EnableProperty(IPropertyGridItem, bool)

Changes enabled state of the property.

EndAddChildren(IPropertyGridItem)

Ends adding children for the specified item.

EndLabelEdit(bool)

Ends label editing, if any.

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).

GetCaptionBackgroundColor()

Imlements get method for CaptionBackgroundColor.

GetCaptionForegroundColor()

Imlements get method for CaptionForegroundColor.

GetCellBackgroundColor()

Imlements get method for CellBackgroundColor.

GetCellDisabledTextColor()

Imlements get method for CellDisabledTextColor.

GetCellTextColor()

Imlements get method for CellTextColor.

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.

GetEmptySpaceColor()

Imlements get method for EmptySpaceColor.

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(PointI)

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.

GetLastItem(PropertyGridIteratorFlags)

Returns last item which could be iterated using given flags.

GetLineColor()

Imlements get method for LineColor.

GetMarginColor()

Imlements get method for MarginColor.

GetMarginWidth()

Gets margin width.

GetPropNameAsLabel()

Gets special property name which means to use label as property name.

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 and subname.

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.

GetSelectionBackgroundColor()

Imlements get method for SelectionBackgroundColor.

GetSelectionForegroundColor()

Imlements get method for SelectionForegroundColor.

GetSpacingY()

Gets current Y spacing.

GetSplitterPosition(int)

Gets current splitter x position.

GetTempVariant()

Gets temporary variant.

GetUnspecifiedCommonValue()

Gets index of common value that will truly change value to unspecified.

GetUnspecifiedValueText(PropertyGridValueFormatFlags)

Returns (visual) text representation of the unspecified property value.

GetVerticalSpacing()

Gets current vertical spacing.

HasVirtualWidth()

Gets whether control has virtual width specified with SetVirtualWidth(int).

HideProperty(IPropertyGridItem, bool, PropertyGridItemValueFlags)

Hides or shows property.

InitAllTypeHandlers()

Registers all type handlers for use in PropertyGrid.

Insert(IPropertyGridItem, IPropertyGridItem)

Inserts property before another property.

InsertByIndex(IPropertyGridItem, int, IPropertyGridItem)

Inserts item into the parent's childs collection at the 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.

RefreshEditor()

Refreshes any active editor control.

RefreshProperty(IPropertyGridItem)

Redraws given property.

RegisterAdditionalEditors()

Registers additional editors for use in PropertyGrid.

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.

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 and false words used in bool properties.

SetCaptionBackgroundColor(Color)

Imlements set method for CaptionBackgroundColor

SetCaptionTextColor(Color)

Imlements set method for CaptionForegroundColor.

SetCellBackgroundColor(Color)

Imlements set method for CellBackgroundColor.

SetCellDisabledTextColor(Color)

Imlements set method for CellDisabledTextColor.

SetCellTextColor(Color)

Imlements set method for CellTextColor.

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.

SetEmptySpaceColor(Color)

Imlements set method for EmptySpaceColor.

SetLineColor(Color)

Imlements set method for LineColor.

SetMarginColor(Color)

Imlements set method for MarginColor.

SetPropertyAttribute(IPropertyGridItem, string, IPropertyGridVariant, PropertyGridItemValueFlags)

Sets an attribute for the property.

SetPropertyAttributeAll(string, IPropertyGridVariant)

Sets an attribute for all the properties.

SetPropertyBackgroundColor(IPropertyGridItem, Color, PropertyGridItemValueFlags)

Sets background colour of a property.

SetPropertyClientData(IPropertyGridItem, IntPtr)

Sets client data of a property.

SetPropertyColorsToDefault(IPropertyGridItem, PropertyGridItemValueFlags)

Resets text and background colors of a property.

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.

SetPropertyLabel(IPropertyGridItem, string)

Sets label of a property.

SetPropertyMaxLength(IPropertyGridItem, int)

Sets maximum length of text in property text editor.

SetPropertyName(IPropertyGridItem, string)

Sets property name.

SetPropertyReadOnly(IPropertyGridItem, bool, PropertyGridItemValueFlags)

Sets property readonly flag.

SetPropertyTextColor(IPropertyGridItem, Color, PropertyGridItemValueFlags)

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.

SetSelectionBackgroundColor(Color)

Imlements set method for SelectionBackgroundColor.

SetSelectionTextColor(Color)

Imlements set method for SelectionForegroundColor.

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.

SetupTextCtrlValue(string)

Setups current text control value.

Sort(PropertyGridItemValueFlags)

Sorts properties.

SortChildren(IPropertyGridItem, PropertyGridItemValueFlags)

Sorts children of a property.

ToVariant(object?)

Converts object to IPropertyGridVariant.

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.