<!--
{
  "availability" : [
    "macOS: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/primary",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSWindowCollectionBehavior@NSWindowCollectionBehaviorPrimary"
  },
  "title" : "primary"
}
-->

# primary

The behavior marking this window as primary for both Stage Manager and full screen.

```
static var primary: NSWindow.CollectionBehavior { get }
```

## Discussion

Marking a window collection behavior as primary means it becomes primary for both Stage Manager and full screen display modes.

To set a different behavior in full screen while keeping Stage Manager primary, set a more specific behavior just for full screen mode (see [`fullScreenAuxiliary`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/fullScreenAuxiliary)).

```swift
window.collectionBehavior = [.primary, .fullScreenAuxiliary]
```

Use this collection behavior for document or viewer windows.

> Note:
> This property is mutually exclusive. Set only one of ``doc://com.apple.appkit/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/primary``, ``doc://com.apple.appkit/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/auxiliary``, or ``doc://com.apple.appkit/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/canJoinAllApplications`` on a window handled by Stage Manager at a time.

---

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)