<h2 id="calculatepanescaffolddirectivewithtwopanesonmediumwidth-windowadaptiveinfo-verticalhingepolicy">calculatePaneScaffoldDirectiveWithTwoPanesOnMediumWidth</h2>

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

```kotlin
@ExperimentalMaterial3AdaptiveApi
fun calculatePaneScaffoldDirectiveWithTwoPanesOnMediumWidth(
    windowAdaptiveInfo: WindowAdaptiveInfo,
    verticalHingePolicy: HingePolicy = HingePolicy.AvoidSeparating,
): PaneScaffoldDirective
```

Calculates the recommended [PaneScaffoldDirective](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneScaffoldDirective) from a given [WindowAdaptiveInfo](/jetpack-compose/androidx.compose.material3/material3-adaptive/classes/WindowAdaptiveInfo). Use this
method with `currentWindowAdaptiveInfoV2` to acquire Material-recommended dense-mode adaptive
layout settings of the current activity window. Note that this function results in a dual-pane
layout when the window width falls in the Medium size bucket, while
[calculatePaneScaffoldDirective](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/functions/calculatePaneScaffoldDirective) results in a single-pane layout instead. We recommend to use
[calculatePaneScaffoldDirective](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/functions/calculatePaneScaffoldDirective), unless you have a strong use case to show two panes on a
medium-width window, which can make your layout look too packed.

See more details on the [Material design guideline site]
(https://m3.material.io/foundations/layout/applying-layout/window-size-classes).

#### Parameters

| | |
| --- | --- |
| windowAdaptiveInfo | [WindowAdaptiveInfo](/jetpack-compose/androidx.compose.material3/material3-adaptive/classes/WindowAdaptiveInfo) that collects useful information in making layout adaptation decisions like [androidx.window.core.layout.WindowSizeClass](/jetpack-compose/androidx.compose.material3/material3-window-size-class/classes/WindowSizeClass). |
| verticalHingePolicy | [HingePolicy](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/HingePolicy) that decides how layouts are supposed to address vertical hinges. |

#### Returns

| | |
| --- | --- |
|  | an [PaneScaffoldDirective](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneScaffoldDirective) to be used to decide adaptive layout states. |