问题标签 [componentmodel]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
29 浏览

c# - 如何在实例化后更改字段类的可浏览属性

我在我的应用程序PropertyGrid控件中使用来显示类的字段。为了定义将显示哪些字段,我使用了Browsable来自ComponentModel. 我需要以两种不同的形式呈现同一个类,第一种必须显示所有字段,第二种必须仅显示用户选择的字段。是否可以在类实例化之后将Browsable属性从true更改为?false示例代码将非常有用。