Back to Devexpress

PropertyDescriptionControl Class

windowsforms-devexpress-dot-xtraverticalgrid-0dbd6dae.md

latest4.9 KB
Original Source

PropertyDescriptionControl Class

The control that displays descriptions for properties being browsed in a PropertyGridControl.

Namespace : DevExpress.XtraVerticalGrid

Assembly : DevExpress.XtraVerticalGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.VerticalGrid

Declaration

csharp
[DXLicenseWinForms]
public class PropertyDescriptionControl :
    BaseControl,
    IPanelControlOwner
vb
<DXLicenseWinForms>
Public Class PropertyDescriptionControl
    Inherits BaseControl
    Implements IPanelControlOwner

Remarks

For an object’s properties, descriptions can be specified via the DescriptionAttribute attribute, The PropertyGridControl doesn’t display property descriptions. To display property descriptions for properties browsed in a PropertyGridControl, use the PropertyDescriptionControl control. Add a PropertyDescriptionControl control to the form, and link it to the Property Grid Control via the PropertyDescriptionControl.PropertyGrid property. Browsing through properties in the Property Grid Control will automatically display property descriptions in the PropertyDescriptionControl.

Example

The following example combines a PropertyGridControl and PropertyDescriptionControl in a panel. The PropertyDescriptionControl displays property descriptions when you browse through items in the PropertyGridControl.

csharp
using DevExpress.XtraEditors;
using DevExpress.XtraVerticalGrid;

private void Form1_Load(object sender, EventArgs e) {
    PanelControl panelControl1 = new PanelControl();
    panelControl1.Parent = this;
    panelControl1.Dock = DockStyle.Left;
    panelControl1.Width = 300;

    PropertyGridControl propertyGridControl1 = new PropertyGridControl(); ;
    PropertyDescriptionControl propertyDescriptionControl1 = new PropertyDescriptionControl();

    propertyGridControl1.Parent = panelControl1;
    propertyGridControl1.Dock = System.Windows.Forms.DockStyle.Fill;
    propertyGridControl1.SelectedObject = this;

    propertyDescriptionControl1.Parent = panelControl1;
    propertyDescriptionControl1.AutoHeight = true;
    propertyDescriptionControl1.Dock = DockStyle.Bottom;
    propertyDescriptionControl1.PropertyGrid = propertyGridControl1;
}
vb
Imports DevExpress.XtraEditors
Imports DevExpress.XtraVerticalGrid

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Dim panelControl1 As PanelControl = New PanelControl()
    panelControl1.Parent = Me
    panelControl1.Dock = DockStyle.Left
    panelControl1.Width = 300

    Dim propertyGridControl1 As PropertyGridControl = New PropertyGridControl()

    Dim propertyDescriptionControl1 As PropertyDescriptionControl = New PropertyDescriptionControl()

    propertyGridControl1.Parent = panelControl1
    propertyGridControl1.Dock = System.Windows.Forms.DockStyle.Fill
    propertyGridControl1.SelectedObject = Me

    propertyDescriptionControl1.Parent = panelControl1
    propertyDescriptionControl1.AutoHeight = True
    propertyDescriptionControl1.Dock = DockStyle.Bottom
    propertyDescriptionControl1.PropertyGrid = propertyGridControl1
End Sub

Implements

IXtraResizableControl

Inheritance

Object MarshalByRefObject Component Control DevExpress.XtraEditors.XtraControl ControlBase BaseControl PropertyDescriptionControl

See Also

PropertyDescriptionControl Members

DevExpress.XtraVerticalGrid Namespace