简体   繁体   English

在propertygrid中显示显式接口成员?

[英]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: 然后以我们的形式设置propertygrid:

propertyGrid1.SelectedObject = new myInterfaceImp();

Unfortunately, PropertyGrid do not show explicit interface implementation. 不幸的是, PropertyGrid没有显示明确的接口实现。 What should we do? 我们应该做什么?

创建某种“视图”对象,该对象知道如何显示myInterface实现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM