Control.DesignMode Control.DesignMode Control.DesignMode Control.DesignMode Property

定義

取得值,指出控制項是否正用於設計介面上。Gets a value indicating whether a control is being used on a design surface.

protected public:
 property bool DesignMode { bool get(); };
protected internal bool DesignMode { get; }
member this.DesignMode : bool
Protected Friend ReadOnly Property DesignMode As Boolean

屬性值

如果控制項正用於設計工具,則為 true,否則為 falsetrue if the control is being used in a designer; otherwise, false.

備註

屬性會傳回,表示控制項正用於設計工具的內容中。 true DesignModeThe DesignMode property returns true to indicate that the control is being used in the context of a designer. 當設計階段行為與執行時間行為不同時,您的自訂控制項可以使用這個屬性。Your custom controls can use this property when design-time behavior is different than run-time behavior.

適用於

另請參閱