* RTL support for **all** Krypton.Toolkit controls - #4358
Open
PWagner1 wants to merge 1 commit into
Open
Conversation
# 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
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: Toolkit RTL layout (#2379)
Summary
Krypton.Toolkitnow uses the same two-flag RTL contract asKryptonFormandKryptonRibbon:RightToLeft.YesplusRightToLeftLayoutmirrors layout (docks, splitters, captions, spin chrome).RightToLeftalone still controls reading order and Near/Far content.Related issues
Krypton.Toolkitcontrols #2379Type of change
Implemented)Changes
RightToLeftLayoutontoVisualControlBase,VisualPanel, andVisualContainerControlBase.ToolkitRtlLayouthelpers andViewDrawDocker.IgnoreRightToLeftLayout.RightToLeftto the inner native control.RightToLeftto the inner grid.Affected packages & target frameworks
Krypton.Toolkit,Krypton.Toolkit.Utilities(CommandLink arrow),Krypton.Ribbon(KryptonRibbon.RightToLeftLayoutis now an override).net472Validation
RTLControlsTest(StartScreen: RTL Compliance Tests).Krypton RTL Exampleson branchalpha-2379-toolkit-rtl.dotnet build ".\Source\Krypton Components\Krypton.Toolkit\Krypton.Toolkit 2022.csproj" -c Debug -f net472powershell -NoProfile -ExecutionPolicy Bypass -STA -File .\Scripts\UnitTests\Invoke-ToolkitRtlScreenshot.ps1(hostsRTLControlsTest;--rtllaunches with both flags). Captured locally as2379-toolkit-rtl-ltr.png/2379-toolkit-rtl-rtl.png.Screenshots / GIFs
Changelog
Documents/Changelog/Changelog.md:Breaking changes & migration
None.
RightToLeftLayoutis additive on Toolkit visual bases.KryptonDateTimePicker/KryptonTreeView/KryptonListViewkeep the same public property name (now inherited, with inner native sync).KryptonRibbon.RightToLeftLayoutis an override of the Toolkit base property.Developer documentation
Documents/Development/Krypton-Toolkit-Rtl.mdChecklist
net472and is C# 7.3 compatible where requiredDocuments/Changelog/Changelog.mdupdatedDocuments/Development/guide added (substantial features)