DynamicValuesAttribute 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将此属性添加到希望值成为动态列表的属性。 具有此属性集的属性的类必须实现 IDynamicValues 接口,因为该接口上的 GetStandardValues mothod 将被调用以检索有效值。
如果该属性存在,但不返回接口,则不会返回任何列表,因此通常会显示一个空的下拉列表。
[System.AttributeUsage(System.AttributeTargets.Property)]
public class DynamicValuesAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Property)>]
type DynamicValuesAttribute = class
inherit Attribute
Public Class DynamicValuesAttribute
Inherits Attribute
- 继承
-
DynamicValuesAttribute
- 属性
构造函数
| 名称 | 说明 |
|---|---|
| DynamicValuesAttribute(Boolean) |
用于启用或禁用动态值。 在构造函数中传递 false 有助于调试,而无需删除属性 |
属性
| 名称 | 说明 |
|---|---|
| Enabled |
将此属性添加到希望值成为动态列表的属性。 具有此属性集的属性的类必须实现 IDynamicValues 接口,因为该接口上的 GetStandardValues mothod 将被调用以检索有效值。 如果该属性存在,但不返回接口,则不会返回任何列表,因此通常会显示一个空的下拉列表。 |