Skip to content

* RTL support for **all** Krypton.Workspace controls - #4355

Open
PWagner1 wants to merge 2 commits into
alphafrom
2383-feature-request-rtl-support-for-all-kryptonworkspace-controls
Open

* RTL support for **all** Krypton.Workspace controls#4355
PWagner1 wants to merge 2 commits into
alphafrom
2383-feature-request-rtl-support-for-all-kryptonworkspace-controls

Conversation

@PWagner1

@PWagner1 PWagner1 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Feature: Logical RTL packing for KryptonWorkspace (#2383)

Summary

Horizontal KryptonWorkspace sequences pack from the right when both RightToLeft and RightToLeftLayout are set (same two-flag contract as KryptonForm / KryptonRibbon). Vertical stacks stay top-to-bottom. Saved XML / Children order is unchanged. Cell tab chrome already came from Navigator; this work is sequence tiling, splitter drag, and left/right drop mapping.

Related issues

Type of change

  • Feature / enhancement (Implemented)

Changes

  • KryptonWorkspace.RightToLeftLayout (logical bool; synced from the parent Form; no WS_EX_LAYOUTRTL).
  • LayoutSequenceNonMaximized packs horizontal items from client.Right when gated (WorkspaceRtlLayout).
  • Vertical separator mouse delta is negated under RTL so dragging toward the visual-right panel shrinks it.
  • DragTargetWorkspaceEdge / DragTargetWorkspaceCellEdge swap Left/Right collection insert mapping when gated.
  • KryptonDocumentGroupHelper remarks: after stays collection-after (visually left under RTL).

Affected packages & target frameworks

  • Packages: Krypton.Workspace (Docking document areas inherit via KryptonSpace).
  • TFMs verified: net472 (Debug TestForm / Workspace build).

Validation

  • TestForm demo: WorkspaceRtlDemo (registered in StartScreen.AddButtons() as Workspace RTL ([Feature Request]: RTL support for **all** Krypton.Workspace controls #2383)).
  • Standard-Toolkit-Demos: append RTL toggle on Workspace Cell Layout, branch alpha-2383-workspace-rtl.
  • Manual steps:
    1. Open WorkspaceRtlDemo. Confirm A is left of C and Top is above Bottom.
    2. Check RightToLeft + RightToLeftLayout. A moves to the right of C; Top stays above Bottom. Status Children order is unchanged.
    3. Save layout, toggle RTL off/on, Load layout — order still A, [Top,Bottom], C.
    4. Drag a page to the physical left edge; the new cell appears on the left.
    5. Drag a splitter; the panel toward the drag grows/shrinks like SplitContainer RTL.
  • Build: dotnet build ".\Source\Krypton Components\TestForm\TestForm.csproj" -c Debug
  • Unit test: powershell -NoProfile -ExecutionPolicy Bypass -STA -File .\Scripts\UnitTests\UnitTest-WorkspaceRtlLayout.ps1

Screenshots / GIFs

2383-workspace-rtl-ltr 2383-workspace-rtl-rtl

Changelog

  • Entry added to Documents/Changelog/Changelog.md:
* Implemented [#2383](https://github.com/Krypton-Suite/Standard-Toolkit/issues/2383), RTL support for **all** `Krypton.Workspace` controls
  * Horizontal sequences pack from the right when `RightToLeft` and `RightToLeftLayout` are both set (same two-flag contract as `KryptonForm` / `KryptonRibbon`). Vertical stacks stay top-to-bottom. Saved XML / `Children` order is unchanged. Set the flags on the host form; `KryptonWorkspace` syncs the layout flag automatically.

Breaking changes & migration

None. Apps that already set both form flags will start seeing horizontal workspace columns pack from the right — that is the feature.

Developer documentation

  • Documents/Development/Krypton-Workspace-RTL.md

Checklist

  • Builds for net472 and is C# 7.3 compatible where required
  • New compiler/analyzer warnings in touched code addressed
  • Documents/Changelog/Changelog.md updated
  • TestForm demo added or updated (features / observable bug fixes)
  • Documents/Development/ guide added (substantial features)
  • Screenshots/GIFs included (UI changes)
  • Breaking-change impact and TFM notes documented above
  • New unit tests have been added

# Feature: Logical RTL packing for KryptonWorkspace (#2383)

## Summary

Horizontal `KryptonWorkspace` sequences pack from the right when both `RightToLeft` and `RightToLeftLayout` are set (same two-flag contract as `KryptonForm` / `KryptonRibbon`). Vertical stacks stay top-to-bottom. Saved XML / `Children` order is unchanged. Cell tab chrome already came from Navigator; this work is sequence tiling, splitter drag, and left/right drop mapping.

## Related issues

- Closes #2383
- Follows #2103 and the Ribbon #2382 dual-flag model

## Type of change

- [x] Feature / enhancement (`Implemented`)

## Changes

- `KryptonWorkspace.RightToLeftLayout` (logical bool; synced from the parent `Form`; no `WS_EX_LAYOUTRTL`).
- `LayoutSequenceNonMaximized` packs horizontal items from `client.Right` when gated (`WorkspaceRtlLayout`).
- Vertical separator mouse delta is negated under RTL so dragging toward the visual-right panel shrinks it.
- `DragTargetWorkspaceEdge` / `DragTargetWorkspaceCellEdge` swap Left/Right collection insert mapping when gated.
- `KryptonDocumentGroupHelper` remarks: `after` stays collection-after (visually left under RTL).

## Affected packages & target frameworks

- Packages: `Krypton.Workspace` (Docking document areas inherit via `KryptonSpace`).
- TFMs verified: `net472` (Debug TestForm / Workspace build).

## Validation

- TestForm demo: `WorkspaceRtlDemo` (registered in `StartScreen.AddButtons()` as **Workspace RTL (#2383)**).
- Standard-Toolkit-Demos: append RTL toggle on **Workspace Cell Layout**, branch `alpha-2383-workspace-rtl`.
- Manual steps:
  1. Open `WorkspaceRtlDemo`. Confirm A is left of C and Top is above Bottom.
  2. Check **RightToLeft + RightToLeftLayout**. A moves to the right of C; Top stays above Bottom. Status **Children** order is unchanged.
  3. Save layout, toggle RTL off/on, Load layout — order still A, [Top,Bottom], C.
  4. Drag a page to the physical left edge; the new cell appears on the left.
  5. Drag a splitter; the panel toward the drag grows/shrinks like SplitContainer RTL.
- Build: `dotnet build ".\Source\Krypton Components\TestForm\TestForm.csproj" -c Debug`
- Unit test: `powershell -NoProfile -ExecutionPolicy Bypass -STA -File .\Scripts\UnitTests\UnitTest-WorkspaceRtlLayout.ps1`

## Screenshots / GIFs

## Changelog

- Entry added to `Documents/Changelog/Changelog.md`:

```markdown
* Implemented [#2383](#2383), RTL support for **all** `Krypton.Workspace` controls
  * Horizontal sequences pack from the right when `RightToLeft` and `RightToLeftLayout` are both set (same two-flag contract as `KryptonForm` / `KryptonRibbon`). Vertical stacks stay top-to-bottom. Saved XML / `Children` order is unchanged. Set the flags on the host form; `KryptonWorkspace` syncs the layout flag automatically.
```

## Breaking changes & migration

None. Apps that already set **both** form flags will start seeing horizontal workspace columns pack from the right — that is the feature.

## Developer documentation

- `Documents/Development/Krypton-Workspace-RTL.md`

## Checklist

- [x] Builds for `net472` and is C# 7.3 compatible where required
- [x] New compiler/analyzer warnings in touched code addressed
- [x] `Documents/Changelog/Changelog.md` updated
- [x] TestForm demo added or updated (features / observable bug fixes)
- [x] `Documents/Development/` guide added (substantial features)
- [x] Screenshots/GIFs included (UI changes)
- [x] Breaking-change impact and TFM notes documented above
- [x] New unit tests have been added
@PWagner1 PWagner1 added this to the Version 110 milestone Sep 6, 2026
@PWagner1
PWagner1 requested a review from a team as a code owner September 6, 2026 08:07
@PWagner1 PWagner1 added area:workspace All issues to do with the workspace. version:110 All things to do with V110. labels Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:workspace All issues to do with the workspace. version:110 All things to do with V110.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: RTL support for **all** Krypton.Workspace controls

1 participant