* RTL support for **all** Krypton.Workspace controls - #4355
Open
PWagner1 wants to merge 2 commits into
Open
Conversation
# 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature: Logical RTL packing for KryptonWorkspace (#2383)
Summary
Horizontal
KryptonWorkspacesequences pack from the right when bothRightToLeftandRightToLeftLayoutare set (same two-flag contract asKryptonForm/KryptonRibbon). Vertical stacks stay top-to-bottom. Saved XML /Childrenorder is unchanged. Cell tab chrome already came from Navigator; this work is sequence tiling, splitter drag, and left/right drop mapping.Related issues
Krypton.Workspacecontrols #2383KryptonFormproperly supports RTL/LTR #2103 and the Ribbon [Bug/Feature Request]: RTL support for **all**Krypton.Ribboncontrols #2382 dual-flag modelType of change
Implemented)Changes
KryptonWorkspace.RightToLeftLayout(logical bool; synced from the parentForm; noWS_EX_LAYOUTRTL).LayoutSequenceNonMaximizedpacks horizontal items fromclient.Rightwhen gated (WorkspaceRtlLayout).DragTargetWorkspaceEdge/DragTargetWorkspaceCellEdgeswap Left/Right collection insert mapping when gated.KryptonDocumentGroupHelperremarks:afterstays collection-after (visually left under RTL).Affected packages & target frameworks
Krypton.Workspace(Docking document areas inherit viaKryptonSpace).net472(Debug TestForm / Workspace build).Validation
WorkspaceRtlDemo(registered inStartScreen.AddButtons()as Workspace RTL ([Feature Request]: RTL support for **all**Krypton.Workspacecontrols #2383)).alpha-2383-workspace-rtl.WorkspaceRtlDemo. Confirm A is left of C and Top is above Bottom.dotnet build ".\Source\Krypton Components\TestForm\TestForm.csproj" -c Debugpowershell -NoProfile -ExecutionPolicy Bypass -STA -File .\Scripts\UnitTests\UnitTest-WorkspaceRtlLayout.ps1Screenshots / GIFs
Changelog
Documents/Changelog/Changelog.md: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.mdChecklist
net472and is C# 7.3 compatible where requiredDocuments/Changelog/Changelog.mdupdatedDocuments/Development/guide added (substantial features)