XCeed PropertyGrid: How to set the right title?
<p>I've implemented ICustomTypeDescriptor to provide my custom descriptor to the XCeed Propertygrid.</p>

<pre><code>public class MyDescriptor : ICustomTypeDescriptor, IDisposable
{
    public MyDescriptor(IMyInterface metadata)
    {
         /* Use object metadata to build the type descriptor */
    }
}
</code></pre>

<p>This works fine, except that the PropertyGrid has as Title "MyDescriptor". I've tried implementing GetAttributes()</p>

<pre><code>public AttributeCollection GetAttributes()
{
    string theRightTitle = metaData.GetTitle(); // Dynamic title, differs depending on metaData object provided in constructor.
    Attribute[] attributes = new Attribute[] {new DescriptionAttribute(theRightTitle) };
    return new AttributeCollection(attributes);
}
</code></pre>

<p>But that doesn't work... How do I ensure that the title of my grid is correct?</p>

<p><strong>Edit</strong>: So what I need is a <em>dynamic</em> way of generating the Title for the PropertyGrid. I've updated the code samples above to reflect this.</p>