BHP
BHP

Reputation: 526

Display explicit interface members in a propertygrid?

Suppose we have this code:

interface myInterface { long Test { set; get; } }

class myInterfaceImp : myInterface
{
    long myInterface.Test { get; set; }
}

and in our form, we set the propertygrid:

propertyGrid1.SelectedObject = new myInterfaceImp();

Unfortunately, PropertyGrid do not show explicit interface implementation. What should we do?

Upvotes: 0

Views: 109

Answers (1)

sarvasana
sarvasana

Reputation: 757

Create some kind of "View" object that knows how to display your myInterface implementation.

Upvotes: 0

Related Questions