# IWindowAwareViewModel.Attach method

Associates the view model with the window that is about to show it. Called by the window services before the window becomes visible.

```csharp
public void Attach(IActionWindow window)
```

| parameter | description |
| --- | --- |
| window | The window that will host this view model. |

## See Also

* interface [IActionWindow](../IActionWindow.md)
* interface [IWindowAwareViewModel](../IWindowAwareViewModel.md)
* namespace [Eremex.AvaloniaUI.Controls.ApplicationServices](../index.md)

<!-- DO NOT EDIT: generated by xmldocmd for Eremex.Common.Contracts.dll -->
