返回一个值,该值指示所描述的属性是否为只读。
命名空间: Microsoft.VisualStudio.Modeling.Design
程序集: Microsoft.VisualStudio.Modeling.Sdk.12.0(在 Microsoft.VisualStudio.Modeling.Sdk.12.0.dll 中)
语法
声明
Protected Friend Overridable Function IsPropertyDescriptorReadOnly ( _
propertyDescriptor As ElementPropertyDescriptor _
) As Boolean
protected internal virtual bool IsPropertyDescriptorReadOnly(
ElementPropertyDescriptor propertyDescriptor
)
参数
- propertyDescriptor
类型:Microsoft.VisualStudio.Modeling.Design.ElementPropertyDescriptor
要为其返回值的域属性的说明符。
返回值
类型:System.Boolean
一个值,该值指示此属性是否为只读的。
异常
异常 | 条件 |
---|---|
ArgumentNullException | propertyDescriptor 为 nullnull 引用(在 Visual Basic 中为 Nothing)。 |
备注
在所有者指定时,属性说明符创建域,则属性说明符的 IsReadOnly 属性调用所有者的 IsPropertyDescriptorReadOnly 方法,并且提供自己为 propertyDescriptor 参数。 在派生类中,这可以用于设置提供了一个中心位置元素属性是否为只读。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。