* Dedicated KryptonSplitButton Toolbox control - #4367
Open
PWagner1 wants to merge 4 commits into
Open
Conversation
# Feature: Dedicated KryptonSplitButton Toolbox control (#4366) ## Summary Adds `KryptonSplitButton`, a Toolbox control that is always a split button: body click fires `Click`, chevron fires `DropDown`. `KryptonButton.ShowSplitOption` remains for the legacy opt-in. ## Related issues - Closes #4366 ## Type of change - [x] Feature / enhancement (`Implemented`) ## Changes - **Krypton.Toolkit** - New `KryptonSplitButton` (`KryptonDropButton` subclass). `Splitter` is locked on; mnemonic fires `Click`. - `KryptonDropButton` click / mnemonic / `WM_CONTEXTMENU` type checks replaced with virtuals (`OpensDropDownOnNonSplitterClick`, `MnemonicPerformsDropDown`, `SuppressSystemContextMenu`). `Splitter` is `virtual`. - `AccessibleRole.SplitButton` via `KryptonSplitButtonAccessibleObject`. - Drop-button smart tag omits `Splitter` for this type. - Toolbox bitmap `ToolboxBitmaps/KryptonSplitButton.bmp`. - **TestForm** - `KryptonSplitButtonDemo` under `KryptonToolkit\Feature`. - Appended to `ButtonsTest` and `DropDownArrowsDemo`. - **Scripts** - `UnitTest-KryptonSplitButton.ps1`; `KryptonSplitButton.` added to designer-serialization core prefixes. ## Affected packages & target frameworks - Packages: `Krypton.Toolkit` - TFMs verified: `net472` (Debug TestForm build) ## Validation - TestForm demo: `KryptonSplitButtonDemo` (StartScreen: **Krypton SplitButton (#4366)**). - Standard-Toolkit-Demos: not updated in this session — `..\Standard-Toolkit-Demos` is on `alpha-3927-krypton-tag-input` with unrelated uncommitted changes. Append `KryptonSplitButton` to `KryptonDropButton Examples` on a new `alpha-4366-krypton-split-button` branch from `alpha` once that tree is clean. - Manual steps: 1. Open **Krypton SplitButton (#4366)**. 2. Click the `KryptonSplitButton` body → status shows Click. 3. Click the chevron → menu and DropDown status. 4. Alt+S on **&Save** → Click, not the menu. 5. Compare with `KryptonButton + ShowSplitOption` and `KryptonDropButton (Splitter = false)`. 6. Switch the theme combo; chevron remains visible. - Build: `dotnet build ".\Source\Krypton Components\TestForm\TestForm.csproj" -c Debug` - Unit test: `powershell -NoProfile -ExecutionPolicy Bypass -STA -File .\Scripts\UnitTests\UnitTest-KryptonSplitButton.ps1` ## Screenshots / GIFs Dedicated `KryptonSplitButton` next to `KryptonButton`, `ShowSplitOption`, and whole-button `KryptonDropButton`. ## Changelog - Entry added to `Documents/Changelog/Changelog.md`: ```markdown * Implemented [#4366](#4366), Dedicated `KryptonSplitButton` Toolbox control (body click vs chevron drop-down). * Drop this control when the button is always split. `KryptonButton.ShowSplitOption` remains for the legacy opt-in. Use `KryptonDropButton` with `Splitter = false` when the whole button should open the menu. The `&Save` mnemonic fires `Click`, not the menu. ``` ## Breaking changes & migration None. `ShowSplitOption` is unchanged. New type only. ## Developer documentation - `Documents/Development/KryptonSplitButton.md` ## Checklist - [x] Builds for `net472` and is C# 7.3 compatible where required - [x] New compiler/analyzer warnings in touched files addressed - [x] `Documents/Changelog/Changelog.md` updated - [x] TestForm demo added or updated - [x] `Documents/Development/` guide added - [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: Dedicated KryptonSplitButton Toolbox control (#4366)
Summary
Adds
KryptonSplitButton, a Toolbox control that is always a split button: body click firesClick, chevron firesDropDown.KryptonButton.ShowSplitOptionremains for the legacy opt-in.Related issues
KryptonSplitButtonsubclass** (optional) #4366Type of change
Implemented)Changes
KryptonSplitButton(KryptonDropButtonsubclass).Splitteris locked on; mnemonic firesClick.KryptonDropButtonclick / mnemonic /WM_CONTEXTMENUtype checks replaced with virtuals (OpensDropDownOnNonSplitterClick,MnemonicPerformsDropDown,SuppressSystemContextMenu).Splitterisvirtual.AccessibleRole.SplitButtonviaKryptonSplitButtonAccessibleObject.Splitterfor this type.ToolboxBitmaps/KryptonSplitButton.bmp.KryptonSplitButtonDemounderKryptonToolkit\Feature.ButtonsTestandDropDownArrowsDemo.UnitTest-KryptonSplitButton.ps1;KryptonSplitButton.added to designer-serialization core prefixes.Affected packages & target frameworks
Krypton.Toolkitnet472(Debug TestForm build)Validation
KryptonSplitButtonDemo(StartScreen: Krypton SplitButton ([Feature Request]: **DedicatedKryptonSplitButtonsubclass** (optional) #4366))...\Standard-Toolkit-Demosis onalpha-3927-krypton-tag-inputwith unrelated uncommitted changes. AppendKryptonSplitButtontoKryptonDropButton Exampleson a newalpha-4366-krypton-split-buttonbranch fromalphaonce that tree is clean.KryptonSplitButtonsubclass** (optional) #4366).KryptonSplitButtonbody → status shows Click.KryptonButton + ShowSplitOptionandKryptonDropButton (Splitter = false).dotnet build ".\Source\Krypton Components\TestForm\TestForm.csproj" -c Debugpowershell -NoProfile -ExecutionPolicy Bypass -STA -File .\Scripts\UnitTests\UnitTest-KryptonSplitButton.ps1Screenshots / GIFs
Dedicated
KryptonSplitButtonnext toKryptonButton,ShowSplitOption, and whole-buttonKryptonDropButton.Changelog
Documents/Changelog/Changelog.md:Breaking changes & migration
None.
ShowSplitOptionis unchanged. New type only.Developer documentation
Documents/Development/KryptonSplitButton.mdChecklist
net472and is C# 7.3 compatible where requiredDocuments/Changelog/Changelog.mdupdatedDocuments/Development/guide added