共用方式為


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 可在範本中建立可編輯設計工具區域的 物件衍生。

適用於

另請參閱