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
|
Hi there, I have tried to use DisplayName attribute to my property
[ DisplayName( "Element Type" )]public ElementClassType ClassType { get{...} } But PropertyGrid still display "ClassType" instead of "ElementType". Is there any property that should I set in PropertyGrid, or something I miss. Thanks in advance. |
|
|
No, that should work, and I have given it a quick test and it is working for me. Can you try it with a current nightly build (from http://www.mindscape.co.nz/products/wpfpropertygrid/nightlybuilds.aspx) please? Thanks! |
|
|
I have download from the latest build and it works. My WpfPropertyGridEnterprise installer date is January 29, 2008. Is this a new feature added after that date? Thanks. |
|
|
Yes. I think DisplayNameAttribute support was added about a month after RTM. We are planning to release v2 fairly soon, which will include all the enhancements and fixes made since RTM (and will be a free upgrade), or of course you can use the current nightly. |
|
|
Ok, thanks for your help Ivan. |
|
|
Hello, I'm also trying to use the DisplayName attribute ... my vb code looks like this on the business object I'm editing with the WPF Property Grid: Imports Mindscape.WpfElementsImports Mindscape.WpfPropertyGrid<DisplayName("Status")> _ Public Property ArchiveStatus() As String GetReturn _formVersion.ArchiveStatus End GetSet(ByVal value As String)_formVersion.ArchiveStatus = value End Set End PropertyThe compiler error I get is that 'DisplayName is not defined'. I'm importing the right stuff and I also have the mindscape dlls referenced in my project. What am I doing wrong?
Douglas Birch |
|
|
DisplayNameAttribute isn't part of the Mindscape DLLs; it's in System.ComponentModel. So I believe you need either to import the System.ComponentModel namespace or to qualify the attribute as <System.ComponentModel.DisplayNameAttribute("Status")>. |
|
|
Doh! |
|