Skip to content

Commit 145c480

Browse files
authored
Merge pull request #859 from erik-hooper/feature/AllowOnActivated
Allow view to be notified
2 parents 9c67073 + 5a524b0 commit 145c480

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Caliburn.Micro.Core/Screen.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ async Task IActivate.ActivateAsync(CancellationToken cancellationToken)
109109
Log.Info("Activating {0}.", this);
110110
await OnActivateAsync(cancellationToken);
111111
IsActive = true;
112+
await OnActivatedAsync(cancellationToken);
112113

113114
await (Activated?.InvokeAllAsync(this, new ActivationEventArgs
114115
{
@@ -185,6 +186,15 @@ protected virtual Task OnActivateAsync(CancellationToken cancellationToken)
185186
return Task.FromResult(true);
186187
}
187188

189+
190+
/// <summary>
191+
/// Called when view has been activated.
192+
/// </summary>
193+
protected virtual Task OnActivatedAsync(CancellationToken cancellationToken)
194+
{
195+
return Task.FromResult(true);
196+
}
197+
188198
/// <summary>
189199
/// Called when deactivating.
190200
/// </summary>

0 commit comments

Comments
 (0)