ControlDesigner.ReadOnly 属性

定义

注意

The recommended alternative is to inherit from ContainerControlDesigner instead and to use an EditableDesignerRegion. Regions allow for better control of the content in the designer. http://go.microsoft.com/fwlink/?linkid=14202

获取或设置一个值,该值指示控件的属性在设计时是否为只读。

public:
 property bool ReadOnly { bool get(); void set(bool value); };
public bool ReadOnly { get; set; }
[System.Obsolete("The recommended alternative is to inherit from ContainerControlDesigner instead and to use an EditableDesignerRegion. Regions allow for better control of the content in the designer. http://go.microsoft.com/fwlink/?linkid=14202")]
public bool ReadOnly { get; set; }
member this.ReadOnly : bool with get, set
[<System.Obsolete("The recommended alternative is to inherit from ContainerControlDesigner instead and to use an EditableDesignerRegion. Regions allow for better control of the content in the designer. http://go.microsoft.com/fwlink/?linkid=14202")>]
member this.ReadOnly : bool with get, set
Public Property ReadOnly As Boolean

属性值

Boolean

如果控件的属性在设计时为只读,则为 true;否则为 false

属性

注解

ControlDesigner 本质上是只读的。 通过添加 DesignerRegion 对象或使用基类(如 ContainerControlDesigner 类)提供读/写功能。

备注

ReadOnly 属性已过时。 派生自 ContainerControlDesigner 可以将可编辑设计器区域添加到的类,也可以从 TemplatedControlDesigner 可在模板中创建可编辑设计器区域的对象派生。

适用于

另请参阅