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, Is there a setting to enable the property grid to display the [Description("something")] when the user hovers over the property? I tried ToolTipService.IsEnabled="True" but the results were not as expected. Thanks in advance, Andy |
|
|
Hi Andy, This is how I've done it in the past: Set ToolTipService.IsEnabled = True on the PropertyGrid control. Set the PropertyNameToolTipTemplate property as follows:
Implement a converter that takes a PropertyGridRow and returns its description. This converter gets used as "desc" in the binding above. Here is possible converter implementation code:
Hope that helps, let me know if you have further questions about this. -Jason Fauchelle |
|
|
Thanks Jason it worked great. For a similar question relating to property grids. If I have multiple groups of settings, I noticed that the group name will display the full class path on the right of it. Is there a way to not show them? For example: The following code
The property grid will show up as follows but I don't want to show "Test.Person"
Thanks in advance, Jason |
|
|
Hello, To get rid of this, you'll need to provide a custom 'editor' template that simply displays nothing. You can provide this using a TypeEditor so that all Person objects are displayed correctly. Hope that helps you resolve it, let me know if you have further questions. -Jason Fauchelle |
|
|
Hi Jason, I was able to create a custom editor to display nothing but it also took out any child property it contained. Is there a way to just take away the description but keep all the child properties? Andy |
|
|
Sorry Andy, Not sure how I missed mentioning this - You'll want to set the AllowExpand property to true on the TypeEditor (or any editor that you used). That will get the behavior you want. -Jason Fauchelle |
|