Table of Contents

Class ExPropertyGrid

Namespace
ExControls
Assembly
ExControls.dll
[ToolboxBitmap(typeof(ToolboxIcons), "Toolbox.ExPropertyGrid.ico")]
public class ExPropertyGrid : PropertyGrid, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl, IComPropertyBrowser, ISearchable, IThemeable
Inheritance
ExPropertyGrid
Implements
Inherited Members
Extension Methods

Constructors

ExPropertyGrid()

Initializes a new instance of the ExPropertyGrid class.

public ExPropertyGrid()

Properties

BrowsableAttributes

Get or set the categories to show.

[Browsable(false)]
public AttributeCollection? BrowsableAttributes { get; set; }

Property Value

AttributeCollection

BrowsableProperties

Get or set the properties to show.

public string[]? BrowsableProperties { get; set; }

Property Value

string[]

Exceptions

ArgumentException

if one or several properties don't exist.

ButtonAlphabetical

Gets an internal Alphabetical button.

[Browsable(true)]
[ExCategory(CategoryType.Layout)]
public ToolStripButton? ButtonAlphabetical { get; }

Property Value

ToolStripButton

ButtonCategorized

Gets an internal Categorized button.

[Browsable(true)]
[ExCategory(CategoryType.Layout)]
public ToolStripButton? ButtonCategorized { get; }

Property Value

ToolStripButton

ButtonPropertyPages

Gets an internal Property Pages button.

[Browsable(true)]
[ExCategory(CategoryType.Layout)]
public ToolStripButton? ButtonPropertyPages { get; }

Property Value

ToolStripButton

FirstHideAllProperties

Gets or sets whether the grid starts with no properties, so that only the attributes and properties set as browsable are shown.

public bool FirstHideAllProperties { get; set; }

Property Value

bool

HiddenAttributes

Get or set the categories to hide.

public AttributeCollection? HiddenAttributes { get; set; }

Property Value

AttributeCollection

HiddenProperties

Get or set the properties to hide.

public string[]? HiddenProperties { get; set; }

Property Value

string[]

InnerToolStrip

Gets internal ToolStrip control.

[TypeConverter(typeof(ExpandableObjectConverter))]
[ExCategory(CategoryType.Layout)]
public ToolStrip? InnerToolStrip { get; }

Property Value

ToolStrip

SelectedObject

Overwrite the PropertyGrid.SelectedObject property.

[Browsable(false)]
public object? SelectedObject { get; set; }

Property Value

object

Remarks

The object passed to the base PropertyGrid is the wrapper.

Separator

Gets an internal Separator.

[Browsable(true)]
[ExCategory(CategoryType.Layout)]
public ToolStripSeparator? Separator { get; }

Property Value

ToolStripSeparator

ShowPropertyPageImage

Gets the image that represents the property page.

protected override Bitmap ShowPropertyPageImage { get; }

Property Value

Bitmap

The image that represents the property page.

SortByCategoryImage

Gets the image that represents sorting grid items by category.

protected override Bitmap SortByCategoryImage { get; }

Property Value

Bitmap

The image that represents sorting by category.

SortByPropertyImage

Gets the image that represents sorting grid items by property name.

protected override Bitmap SortByPropertyImage { get; }

Property Value

Bitmap

The image that represents sorting by property.

Methods

ApplyTheme(ExTheme)

Sets the colors of the grid, its help, commands and scroll bars by the theme. The tool strip gets the theme from the handler the application registered for ToolStrip (Register<T>(Action<T, ExTheme>)); without it the custom style colors it by the theme.

public void ApplyTheme(ExTheme theme)

Parameters

theme ExTheme

theme to apply

OnBrowsablePropertiesChanged()

Called when the browsable properties have changed.

protected virtual void OnBrowsablePropertiesChanged()

Search(string)

Determines whether the control contains the specified text.

public bool Search(string text)

Parameters

text string

The text to search for.

Returns

bool

true if the text was found; otherwise, false.