[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Collapse]Property Grid
    Overview
   [Expand]Getting Started
   [Expand]Property Definitions
    Property Attributes
    Property Categories
    Descriptions
    Expandability Customization
    Property Menu
   [Expand]Visual Elements
    Appearance Customization
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Property Attributes

The PropertyGrid control recognizes property attributes specified in the model.

Property attributes allow you to configure the appearance and behavior of the PropertyGrid control on the model level. To use property atributes in your project, reference the System.ComponentModel namespace.

The following example demonstrates the property attribute syntax.

The following table lists some of the property attributes recognized by the PropertyGrid control.

Attribute

Description

BrowsableAttribute Specifies whether the property is displayed within the property grid.
CategoryAttribute Specifies the property's category.
To learn more, see Property Categories.
DefaultValueAttribute Specifies the property's default value.
DescriptionAttribute Specifies the property's description.
To learn more, see Property descriptions.
DisplayNameAttribute Specifies the property's display name.
ReadOnlyAttribute Specifies whether the property is read-only.
TypeConverterAttribute Specifies a type converter for the property.
To learn more, see Expandability Customization.
InstanceInitializerAttribute Specifies an instance initializer for the property.
To learn more, see Collection Definitions.

The following example demonstrates the use of various property attributes.

Expanded See Also

Is this topic helpful?​​​​​​​