<div class='type'>Function</div>


<a id='references'></a>


<h2 id="windowsize-size">WindowSize</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
expect fun DeviceConfigurationOverride.Companion.WindowSize(
    size: DpSize
): DeviceConfigurationOverride
```


A `DeviceConfigurationOverride` that overrides the window size for the contained content.

Like `ForcedSize`, this is only suitable for tests, since this will override `LocalDensity` to
ensure that the `size` is met (as opposed to `Modifier.requiredSize` which will result in
clipping).

Unlike `ForcedSize`, this override will override `LocalWindowInfo` and `LocalConfiguration` on
Android to reflect the requested size.

#### Parameters

| | |
| --- | --- |
| size | the `DpSize` to force the window size to appear as, changing density if necessary |


#### Returns

| | |
| --- | --- |
|  | a `DeviceConfigurationOverride` that forces the window size. |






<hr class="docs-overload-divider">


<h2 id="windowsize-size-2">WindowSize</h2>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
actual fun DeviceConfigurationOverride.Companion.WindowSize(
    size: DpSize
): DeviceConfigurationOverride
```