> 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/resources/viewmodels-as-resources.md).

# ViewModels as resources

There scenarios in which it could be handly to have the current View ViewModel being registered also as a View resource. ViewModels can be exposed as a View resource via the `ExposeViewModelAsStaticResource` [runtime convention](/release-2/presentation/conventions/runtime-conventions.md). The default behavior is that ViewModels are never exposed as resources.

It's possible to change the way resource keys are generated for exposed ViewModels via the `GenerateViewModelStaticResourceKey` [convention](/release-2/presentation/conventions/runtime-conventions.md)
