Class ExPropertyGrid
- Namespace
- ExControls
- Assembly
- ExControls.dll
Extended PropertyGrid. Part of this code is from: https://www.codeproject.com/Articles/13342/Filtering-properties-in-a-PropertyGrid
[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
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
ButtonCategorized
Gets an internal Categorized button.
[Browsable(true)]
[ExCategory(CategoryType.Layout)]
public ToolStripButton? ButtonCategorized { get; }
Property Value
ButtonPropertyPages
Gets an internal Property Pages button.
[Browsable(true)]
[ExCategory(CategoryType.Layout)]
public ToolStripButton? ButtonPropertyPages { get; }
Property Value
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
HiddenAttributes
Get or set the categories to hide.
public AttributeCollection? HiddenAttributes { get; set; }
Property Value
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
SelectedObject
Overwrite the PropertyGrid.SelectedObject property.
[Browsable(false)]
public object? SelectedObject { get; set; }
Property Value
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
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
themeExThemetheme 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
textstringThe text to search for.