BasicDesignerLoader.OnBeginLoad 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
通知設計載入器載入即將開始。
protected:
virtual void OnBeginLoad();
protected virtual void OnBeginLoad();
abstract member OnBeginLoad : unit -> unit
override this.OnBeginLoad : unit -> unit
Protected Overridable Sub OnBeginLoad ()
備註
OnBeginLoad此方法被呼叫以啟動載入過程。 你應該在此時進行任何必要的初始化載入。 此方法不應用於實際負載。 預設實作會關閉變更通知,並設定 BasicDesignerLoader 載入。
如果你實作 IDesignerLoaderService 提供依賴負載支援,應該在第一個依賴負載發生時呼叫 OnBeginLoad 。 在最後一次呼叫IDesignerLoaderService.DependentLoadComplete方法之後呼叫該OnEndLoad方法。 預設情況下, BasicDesignerLoader 它會 IDesignerLoaderService 幫你實作並執行這件事。 若 IDesignerLoaderService 在 被呼叫時 BeginLoad 無法使用, BeginLoad 則會直接呼叫 OnBeginLoad。
如果您自行提供裝載服務,或選擇不提供裝載服務,您需負責撥打此方法。 該BeginLoad方法會自動呼叫此值,若有則間接呼叫,若無法使用則直接呼叫IDesignerLoaderService.AddLoadDependencyIDesignerLoaderService。