DesignerProperties.IsInDesignMode 附加屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定 a DependencyObject 是否在設計者的情境下執行。
see GetIsInDesignMode, and SetIsInDesignMode
see GetIsInDesignMode, and SetIsInDesignMode
see GetIsInDesignMode, and SetIsInDesignMode
備註
元件與控制開發者可能會利用此特性,在設計器中執行與在應用程式中執行不同的邏輯。
設計師可能會改變此屬性的值,將控制項從設計模式移動到執行模式,再回到設計模式。 根據該屬性值改變狀態的元件,應覆寫虛擬 OnPropertyChanged 方法並在 IsInDesignMode 屬性值改變時更新狀態。
相依財產資訊
| 識別碼欄位 | 元資料屬性設為 true |
|---|---|
| IsInDesignModeProperty | OverridesInheritanceBehavior、Inherits |