OpenWorkspaceWindow95Action
An environment action for opening or focusing workspace routes.
OpenWorkspaceWindow95Action is the low-level equivalent of WorkspaceLink95 when launch behavior must live inside a custom control.
Use it
import Swift95
import SwiftUI
struct OpenWorkspaceWindow95ActionExample: View {
private enum Route: Hashable { case notes }
@Environment(\.openWorkspaceWindow95) private var openWindow
var body: some View {
Button95("Open Notes") {
openWindow(Route.notes)
}
}
}Essential behavior
RouteThe Hashable value must match the nearest Workspace95 route type.
BehaviorOpens a closed route or focuses and restores an existing one.
ConveniencePrefer WorkspaceLink95 when a styled launch label is sufficient.
Related
Open the complete OpenWorkspaceWindow95Action API reference →