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

# NSWindow.CollectionBehavior

Window collection behaviors related to Mission Control, Spaces, and Stage Manager.

```
struct CollectionBehavior
```

## Overview

Collection behaviors are properties you set on windows to control their display characteristics in window management technologies. Use them to specify a preference on how windows behave in window management technologies like Mission Control, Spaces, and Stage Manager.

To set a collection behavior on a window, assign one or more behavior options to the window’s [`collectionBehavior`](/documentation/AppKit/NSWindow/collectionBehavior-swift.property) property:

```swift
window.collectionBehavior = .primary
```

Not all collection behaviors apply to all windowing management technologies, and some are mutually exclusive to their respective groups. For example, [`primary`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/primary), [`auxiliary`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/auxiliary), and [`canJoinAllApplications`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/canJoinAllApplications) only apply to full screen and Stage Manager. They’re also mutually exclusive. Specify at most one per window.

## Topics

### Window Collection Behaviors Creation

[`init(rawValue:)`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/init(rawValue:))

Creates a window collection behavior using the given raw value.

### Stage Manager and full screen

[`primary`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/primary)

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

[`auxiliary`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/auxiliary)

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

[`canJoinAllApplications`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/canJoinAllApplications)

The behavior marking this window as one that can join all apps for both Stage Manager and full screen.

### Spaces

[`NSWindowCollectionBehaviorDefault`](/documentation/AppKit/NSWindowCollectionBehavior/NSWindowCollectionBehaviorDefault)

The window appears in only one space at a time.

[`canJoinAllSpaces`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/canJoinAllSpaces)

The window can appear in all spaces.

[`moveToActiveSpace`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/moveToActiveSpace)

When the window becomes active, move it to the active space instead of switching spaces.

### Mission Control

[`stationary`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/stationary)

Mission Control doesn’t affect the window, so it stays visible and stationary, like the desktop window.

### Spaces and Mission Control

[`managed`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/managed)

The window participates in Mission Control and Spaces.

[`transient`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/transient)

The window floats in Spaces and hides in Mission Control.

### Full screen

[`fullScreenPrimary`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/fullScreenPrimary)

The window can enter full-screen mode.

[`fullScreenAuxiliary`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/fullScreenAuxiliary)

The window displays on the same space as the full screen window.

[`fullScreenNone`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/fullScreenNone)

The window doesn’t support full-screen mode.

[`fullScreenAllowsTiling`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/fullScreenAllowsTiling)

The window can be a secondary full screen tile even if it can’t be a full screen window itself.

[`fullScreenDisallowsTiling`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/fullScreenDisallowsTiling)

The window doesn’t support being a full-screen tile window, but may support being a full-screen window.

### Window cycling

[`participatesInCycle`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/participatesInCycle)

The window participates in the window cycle for use with the Cycle Through Windows menu item.

[`ignoresCycle`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct/ignoresCycle)

The window isn’t part of the window cycle for use with the Cycle Through Windows menu item.



---

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)