編集

次の方法で共有


ObservableRecipient.OnActivated Method

Definition

Raised whenever the IsActive property is set to true. Use this method to register to messages and do other initialization for this instance.

protected virtual void OnActivated ();
abstract member OnActivated : unit -> unit
override this.OnActivated : unit -> unit
Protected Overridable Sub OnActivated ()

Remarks

The base implementation registers all messages for this recipients that have been declared explicitly through the IRecipient<TMessage> interface, using the default channel. For more details on how this works, see the RegisterAll(IMessenger, Object) method. If you need more fine tuned control, want to register messages individually or just prefer the lambda-style syntax for message registration, override this method and register manually.

Applies to