ControlDesigner.ReadOnly 属性

定义

警告

此 API 现已过时。

获取或设置一个值,该值指示控件的属性在设计时是否为只读。Gets or sets a value indicating whether the properties of the control are read-only at design time.

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
Public Property ReadOnly As Boolean

属性值

如果控件的属性在设计时为只读,则为 true;否则为 falsetrue, if the properties of the control are read-only at design time; otherwise, false.

属性

注解

ControlDesigner 类在本质上是只读的。The ControlDesigner class is read-only, by nature. 读/写功能通过添加 DesignerRegion 对象或使用基类(如 ContainerControlDesigner 类)提供。Read/write features are provided by adding a DesignerRegion object or using base classes, such as the ContainerControlDesigner class.

备注

ReadOnly 属性已过时。The ReadOnly property is obsolete. ContainerControlDesigner 类派生,你可以从该类添加可编辑的设计器区域,或从可在模板中创建可编辑的设计器区域的 TemplatedControlDesigner 对象。Derive from the ContainerControlDesigner class to which you can add editable designer regions or from the TemplatedControlDesigner object to which you can create editable designer regions in templates.

适用于

另请参阅