> For the complete documentation index, see [llms.txt](https://docs.radicalframework.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.radicalframework.com/release-2/presentation/iview-resolver/default-view-behaviors.md).

# Default view behaviors

We have seen how Radical Presentation [resolves views instances](/release-2/presentation/iview-resolver.md) at runtime and we have told that during the resolution process we inject/attach to the resolved view some behaviors using a convention.

The convention attaches the following behaviors to each resolved view:

* to every view (every DependencyObject) attaches the “**DependencyObjectCloseHandlerBehavior**” whose role is to allow the view model to send a close request message to its own view without the need to handle a reference to the view;
* if the **view is a window** attaches the “**WindowLifecycleNotificationsBehavior**” used to notify to the view model the lifecycle state changes of the view (loaded, shown, activated, closing and closed);
* “else if” the **view is a FrameworkElement** attaches the “**FrameworkElementLifecycleNotificationsBehavior**” whose role is notify to the view model when the view is loaded;

The easiest way to handle view lifecycle state changes in the `ViewModel` is to setup a [callback expectation](/release-2/presentation/iview-resolver/view-life-cycle-events/callback-expectations.md).

## Automatic broker unsubscribe

The `WindowLifecycleNotificationsBehavior` whenever the `view` is closed invokes `ViewReleaseHandler` convention that is responsible to determine if the `ViewModel` associated with the closed `View` should be unsubscribed from all the message broker subscriptions, if any, created.
