Skip to content

* Dedicated KryptonSplitButton Toolbox control - #4367

Open
PWagner1 wants to merge 4 commits into
alphafrom
4366-feature-request-dedicated-kryptonsplitbutton-subclass-optional
Open

* Dedicated KryptonSplitButton Toolbox control#4367
PWagner1 wants to merge 4 commits into
alphafrom
4366-feature-request-dedicated-kryptonsplitbutton-subclass-optional

Conversation

@PWagner1

@PWagner1 PWagner1 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

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

Type of change

  • 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 ([Feature Request]: **Dedicated KryptonSplitButton subclass** (optional) #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 ([Feature Request]: **Dedicated KryptonSplitButton subclass** (optional) #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

4366-krypton-split-button-default

Dedicated KryptonSplitButton next to KryptonButton, ShowSplitOption, and whole-button KryptonDropButton.

Changelog

  • Entry added to Documents/Changelog/Changelog.md:
* Implemented [#4366](https://github.com/Krypton-Suite/Standard-Toolkit/issues/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

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

# 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
@PWagner1 PWagner1 added this to the Version 110 milestone Sep 7, 2026
@PWagner1
PWagner1 requested a review from a team as a code owner September 7, 2026 10:16
@PWagner1 PWagner1 added area:toolkit All issues related to the toolkit components. version:110 All things to do with V110. labels Sep 7, 2026
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]: **Dedicated KryptonSplitButton subclass** (optional)

1 participant