<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macOS: 15.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/WindowLayoutRoot",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI16WindowLayoutRootV"
  },
  "title" : "WindowLayoutRoot"
}
-->

# WindowLayoutRoot

A proxy which represents the root contents of a window.

```
struct WindowLayoutRoot
```

## Overview

This type acts like a proxy for the contents of the window defined by a
SwiftUI [`Scene`](/documentation/SwiftUI/Scene). The `Scene.defaultWindowPlacement(_:)` modifier
receives an instance of this type, representing the contents of the window
being created.

Use this proxy to get information about the window’s contents, like it’s
size.

## Topics

### Instance Methods

[`func sizeThatFits(ProposedViewSize) -> CGSize`](/documentation/SwiftUI/WindowLayoutRoot/sizeThatFits(_:))

Asks the window’s content for its size.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)