Skip to content

* RTL support for **all** Krypton.Toolkit controls - #4358

Open
PWagner1 wants to merge 1 commit into
alphafrom
2379-feature-request-rtl-support-for-all-kryptontoolkit-controls
Open

* RTL support for **all** Krypton.Toolkit controls#4358
PWagner1 wants to merge 1 commit into
alphafrom
2379-feature-request-rtl-support-for-all-kryptontoolkit-controls

Conversation

@PWagner1

@PWagner1 PWagner1 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Feature: Toolkit RTL layout (#2379)

Summary

Krypton.Toolkit now uses the same two-flag RTL contract as KryptonForm and KryptonRibbon: RightToLeft.Yes plus RightToLeftLayout mirrors layout (docks, splitters, captions, spin chrome). RightToLeft alone still controls reading order and Near/Far content.

Related issues

Type of change

  • Feature / enhancement (Implemented)

Changes

  • Lifted RightToLeftLayout onto VisualControlBase, VisualPanel, and VisualContainerControlBase.
  • Added ToolkitRtlLayout helpers and ViewDrawDocker.IgnoreRightToLeftLayout.
  • CheckBox/RadioButton dockers ignore auto-flip so glyph docks are not inverted twice.
  • NumericUpDown/DomainUpDown move spin buttons to the start edge when both flags are set.
  • ListBox/CheckedListBox/RichTextBox forward RightToLeft to the inner native control.
  • SplitContainer, GroupBox, and HeaderGroup pick up docker/panel mirroring via the new layout flag.
  • DateTimePicker, TreeView, ListView, and Ribbon keep specialised layout flags in sync with the base property.
  • Context menus copy both flags onto the popup; submenus open toward the start edge; CommandLink arrows and TaskDialog columns mirror; PropertyGrid forwards RightToLeft to the inner grid.

Affected packages & target frameworks

  • Packages: Krypton.Toolkit, Krypton.Toolkit.Utilities (CommandLink arrow), Krypton.Ribbon (KryptonRibbon.RightToLeftLayout is now an override).
  • TFMs verified: net472

Validation

  • TestForm demo: RTLControlsTest (StartScreen: RTL Compliance Tests).
  • Standard-Toolkit-Demos: Krypton RTL Examples on branch alpha-2379-toolkit-rtl.
  • Manual steps:
    1. Open RTL Compliance Tests.
    2. Click Toggle RTL (sets both flags).
    3. Confirm calendars, NUD spin buttons, lists, split, group/header, checkbox/radio, CommandLink arrow, context menu packing, PropertyGrid, and TaskDialog columns mirror; caption text stays readable.
  • Build: dotnet build ".\Source\Krypton Components\Krypton.Toolkit\Krypton.Toolkit 2022.csproj" -c Debug -f net472
  • Screenshots: powershell -NoProfile -ExecutionPolicy Bypass -STA -File .\Scripts\UnitTests\Invoke-ToolkitRtlScreenshot.ps1 (hosts RTLControlsTest; --rtl launches with both flags). Captured locally as 2379-toolkit-rtl-ltr.png / 2379-toolkit-rtl-rtl.png.

Screenshots / GIFs

2379-toolkit-rtl-ltr 2379-toolkit-rtl-rtl

Changelog

  • Entry added to Documents/Changelog/Changelog.md:
* Implemented [#2379](https://github.com/Krypton-Suite/Standard-Toolkit/issues/2379), RTL support for **all** `Krypton.Toolkit` controls
  * Set `RightToLeft` and `RightToLeftLayout` on the host `KryptonForm` (or on the control). Both flags together mirror docks, splitters, group/header captions, spin buttons, and list reading order; `RightToLeft` alone still controls text Near/Far.
  * Context menus copy both flags onto the popup; submenus open toward the start edge; CommandLink arrows and TaskDialog table columns mirror when both flags are set. `KryptonPropertyGrid` forwards `RightToLeft` to the inner WinForms grid.

Breaking changes & migration

None. RightToLeftLayout is additive on Toolkit visual bases. KryptonDateTimePicker / KryptonTreeView / KryptonListView keep the same public property name (now inherited, with inner native sync). KryptonRibbon.RightToLeftLayout is an override of the Toolkit base property.

Developer documentation

  • Documents/Development/Krypton-Toolkit-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

# Feature: Toolkit RTL layout (#2379)

## Summary

`Krypton.Toolkit` now uses the same two-flag RTL contract as `KryptonForm` and `KryptonRibbon`: `RightToLeft.Yes` plus `RightToLeftLayout` mirrors layout (docks, splitters, captions, spin chrome). `RightToLeft` alone still controls reading order and Near/Far content.

## Related issues

- Closes #2379

## Type of change

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

## Changes

- Lifted `RightToLeftLayout` onto `VisualControlBase`, `VisualPanel`, and `VisualContainerControlBase`.
- Added `ToolkitRtlLayout` helpers and `ViewDrawDocker.IgnoreRightToLeftLayout`.
- CheckBox/RadioButton dockers ignore auto-flip so glyph docks are not inverted twice.
- NumericUpDown/DomainUpDown move spin buttons to the start edge when both flags are set.
- ListBox/CheckedListBox/RichTextBox forward `RightToLeft` to the inner native control.
- SplitContainer, GroupBox, and HeaderGroup pick up docker/panel mirroring via the new layout flag.
- DateTimePicker, TreeView, ListView, and Ribbon keep specialised layout flags in sync with the base property.
- Context menus copy both flags onto the popup; submenus open toward the start edge; CommandLink arrows and TaskDialog columns mirror; PropertyGrid forwards `RightToLeft` to the inner grid.

## Affected packages & target frameworks

- Packages: `Krypton.Toolkit`, `Krypton.Toolkit.Utilities` (CommandLink arrow), `Krypton.Ribbon` (`KryptonRibbon.RightToLeftLayout` is now an override).
- TFMs verified: `net472`

## Validation

- TestForm demo: `RTLControlsTest` (StartScreen: RTL Compliance Tests).
- Standard-Toolkit-Demos: `Krypton RTL Examples` on branch `alpha-2379-toolkit-rtl`.
- Manual steps:
  1. Open RTL Compliance Tests.
  2. Click Toggle RTL (sets both flags).
  3. Confirm calendars, NUD spin buttons, lists, split, group/header, checkbox/radio, CommandLink arrow, context menu packing, PropertyGrid, and TaskDialog columns mirror; caption text stays readable.
- Build: `dotnet build ".\Source\Krypton Components\Krypton.Toolkit\Krypton.Toolkit 2022.csproj" -c Debug -f net472`
- Screenshots: `powershell -NoProfile -ExecutionPolicy Bypass -STA -File .\Scripts\UnitTests\Invoke-ToolkitRtlScreenshot.ps1` (hosts `RTLControlsTest`; `--rtl` launches with both flags). Captured locally as `2379-toolkit-rtl-ltr.png` / `2379-toolkit-rtl-rtl.png`.

## Screenshots / GIFs

## Changelog

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

```markdown
* Implemented [#2379](#2379), RTL support for **all** `Krypton.Toolkit` controls
  * Set `RightToLeft` and `RightToLeftLayout` on the host `KryptonForm` (or on the control). Both flags together mirror docks, splitters, group/header captions, spin buttons, and list reading order; `RightToLeft` alone still controls text Near/Far.
  * Context menus copy both flags onto the popup; submenus open toward the start edge; CommandLink arrows and TaskDialog table columns mirror when both flags are set. `KryptonPropertyGrid` forwards `RightToLeft` to the inner WinForms grid.
```

## Breaking changes & migration

None. `RightToLeftLayout` is additive on Toolkit visual bases. `KryptonDateTimePicker` / `KryptonTreeView` / `KryptonListView` keep the same public property name (now inherited, with inner native sync). `KryptonRibbon.RightToLeftLayout` is an override of the Toolkit base property.

## Developer documentation

- `Documents/Development/Krypton-Toolkit-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
@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 11:09
@PWagner1 PWagner1 added area:toolkit All issues related to the toolkit components. version:110 All things to do with V110. labels Sep 6, 2026
@PWagner1 PWagner1 linked an issue Sep 6, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:toolkit All issues related to the toolkit components. 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.Toolkit controls

1 participant