# view life cycle events

We have seen that the infrastructure has a way, by default based on behaviors, to notify a `ViewModel` that its own `View` state is changing.

## The View is a Window

If the view is a window we have several state that can be handled/intercepted by the coupled `ViewModel`:

* Loaded;
* Activated;
* Shown;
* Closing;
* Closed;

## The View is a FrameworkElement (e.g. a UserControl)

If the view is a user control the only state we can intercept is the `Loaded` event.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.radicalframework.com/release-1/presentation/iview-resolver/view-life-cycle-events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
