Event Activating
Cancelable event raised when the user has performed an action (e.g. Activate) causing the View to change state or preparing it for interaction. Set CommandEventArgs.Handled to true to indicate the event was handled and processing should stop.
public event EventHandler<CommandEventArgs>? Activating
Returns
- EventHandler<CommandEventArgs>
- Cancelable event raised when the user has performed an action (e.g. ) causing the View to change state or preparing it for interaction. Set CommandEventArgs.Handled to true to indicate the event was handled and processing should stop.
Remarks
When to use: Subscribe to Activating only when you need to inspect or cancel the
in-flight Activate operation (e.g., set e.Handled = true to prevent the state change). For simple
side-effects that don't need to cancel, subscribe to Activated instead — it is lighter-weight and
communicates intent more clearly.
Rule of thumb: If your handler doesn't read or set anything on CommandEventArgs
(no e.Handled, no inspection of context), use Activated.