This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
1. I am using source code downloaded on November 11th and System.ComponentModel.DisplayNameAttribute associated with a public property is not reflected within the PG. Anything special I should be doing? 2. Does the PG recognize the System.ComponentModel.DescriptionAttribute of a property? If so, is there an easy way to retrieve this for OneTime binding to a text box? TIA.
|
|
|
You should not need to do anything special to get DisplayNameAttribute to work. I have just checked this in our test environment and it seems to be okay for us -- could you send us a repro please? Thanks! The grid does not directly use the DescriptionAttribute, but we do provide the RowToDescriptionConverter that enables you to get the description of a PropertyGridRow. For example you can use this to bind a description panel to the selected item a la Windows Forms property grid. See How Do I > Show a Description Panel in the help file for an example. |
|
|
Never mind for 2, if you do not have the time. I used the following code in SelectedGridItemChanged of PG. PropertyDescriptor props = TypeDescriptor.GetProperties(e.NewSelection.Node.Source)[e.NewSelection.Node.Name]; |
|