Skip to content

chore: sync alpha → alpha-backup (automated) - #3366

Merged
PWagner1 merged 42 commits into
alpha-backupfrom
alpha
Apr 28, 2026
Merged

chore: sync alpha → alpha-backup (automated)#3366
PWagner1 merged 42 commits into
alpha-backupfrom
alpha

Conversation

@github-actions

Copy link
Copy Markdown

Automated PR: alpha has had commits in the last 24 hours. Merge to update alpha-backup.

Triggered by Alpha to Alpha-Backup Sync workflow.

PWagner1 and others added 30 commits March 25, 2026 15:50
…g a custom theme

# PR Description - #3183

## Summary
Fix a rendering artifact (a small square) appearing next to the `KryptonForm` Close (X) button when using a custom XML-based Krypton theme/palette.

## Root Cause
When importing a custom palette from XML, palette values that are omitted by the theme XML could remain at placeholder/default C# values instead of being initialized from the palette's `BasePalette`. This could leave caption/button chrome in an invalid/partial state, producing a small stray visual element.

## Changes
In `KryptonCustomPaletteBase.ImportFromXmlDocument`, the palette is now populated from `BasePalette` before applying the XML overrides:
- Call `PopulateFromBaseOperation(null)` before importing the `Properties` / `Images` elements from the XML.

## Why this works
The initial populate step ensures missing metrics/draw settings (including caption/button related values used by the form window buttons) are correctly inherited from the base palette. The subsequent XML import can then override only what the theme explicitly defines.

## Files Modified
- `Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs`

## Testing
- Repro: apply a custom theme (e.g. `Microsoft365Pink`) to a `KryptonForm` and verify the small square near the Close button is gone.
- Sanity: verify built-in palettes are unaffected.

## Notes
- A full `dotnet build` was not clean in this environment due to pre-existing MSBuild/resource configuration errors unrelated to this palette change.
…e-button-on-kryptonform-when-using-a-custom-theme
…kryptonform-when-using-a-custom-theme' of https://github.com/Krypton-Suite/Standard-Toolkit into 3183-bug-small-square-rendered-next-to-close-button-on-kryptonform-when-using-a-custom-theme
…kryptonform-when-using-a-custom-theme' of https://github.com/Krypton-Suite/Standard-Toolkit into 3183-bug-small-square-rendered-next-to-close-button-on-kryptonform-when-using-a-custom-theme
…e-button-on-kryptonform-when-using-a-custom-theme
…e-button-on-kryptonform-when-using-a-custom-theme
# Visual Studio Templates (#908)

## Summary

Implements Visual Studio item/project template support for Krypton, enabling users to create Krypton-first forms and projects directly via **New Item** and **New Project** workflows.

This addresses the feature request in [#908](#908).

## Why

Previously, users typically started from standard WinForms templates and converted forms to Krypton manually.
This change reduces setup friction and makes Krypton a first-class starting point in Visual Studio.

## What Changed

### 1. Added Templates Directory Structure

Created a new top-level `Templates/` directory containing:

- item templates
- project templates
- installation/readme guidance

### 2. Added Item Templates

- `KryptonForm` item template
  - Generates a `KryptonForm` partial class and designer file.
- `KryptonRibbonForm` item template
  - Generates a `KryptonForm` with a pre-configured `KryptonRibbon` control.

### 3. Added Project Templates

- `KryptonWinFormsApp` project template
  - New WinForms app with `MainForm : KryptonForm`.
- `KryptonRibbonWinFormsApp` project template
  - New WinForms app with `MainForm : KryptonForm` and a ribbon pre-added.

### 4. Standardized Template Target Framework

Updated project templates to default to:

- `net10.0-windows`

### 5. Added GitHub Workflow for Template Release Assets

Added `.github/workflows/templates-release.yml` to:

- package template folders into Visual Studio-compatible zip assets,
- upload artifacts on workflow runs,
- publish/update GitHub Release assets per branch channel.

Branch/channel behavior:

- `master` -> `templates-stable`
- `canary` -> `templates-canary`
- `alpha` -> `templates-alpha`
- `V105-LTS` -> `templates-lts`
- manual non-standard branch -> `templates-<sanitized-branch>` (prerelease)

Kill switch support:

- repository variable `TEMPLATES_RELEASE_DISABLED=true`

### 6. Added Comprehensive Developer Documentation

Created:

- `Documents/Development/Visual-Studio-Templates-Developer-Guide.md`

This includes architecture, maintenance workflow, release automation details, troubleshooting, and extension guidance.

Also updated:

- `Templates/README.md` to include a maintainer doc link.

## Files Added/Updated (High Level)

- Added: `Templates/ItemTemplates/*`
- Added: `Templates/ProjectTemplates/*`
- Added: `Templates/README.md`
- Added: `.github/workflows/templates-release.yml`
- Added: `Documents/Development/Visual-Studio-Templates-Developer-Guide.md`

## Testing Plan

### Manual Validation (Visual Studio)

- [ ] Zip each template folder with `.vstemplate` at archive root.
- [ ] Copy item template zips to VS ItemTemplates folder.
- [ ] Copy project template zips to VS ProjectTemplates folder.
- [ ] Restart Visual Studio.
- [ ] Confirm templates appear in:
  - [ ] Add New Item (`Krypton Form`, `Krypton Ribbon Form`)
  - [ ] Create New Project (`Krypton WinForms App`, `Krypton Ribbon WinForms App`)
- [ ] Instantiate each template and ensure files are generated correctly.
- [ ] Build generated projects successfully on `net10.0-windows`.

### Workflow Validation

- [ ] Run `Templates Release` via `workflow_dispatch`.
- [ ] Confirm workflow artifacts include all expected zip files.
- [ ] Confirm release tag/channel updated with latest assets.
- [ ] Verify stable channel is latest only for `master`.

## Risks / Considerations

- Visual Studio template packaging is sensitive to zip root structure; `.vstemplate` must be at archive root.
- Workflow depends on GitHub release permissions (`contents: write`) and repository action variables.
- `KryptonRibbonForm` is a template concept (form + ribbon setup), not a framework class with that exact type name.

## Backward Compatibility

- No runtime breaking API changes in Krypton libraries.
- Changes are additive (new templates + workflow + docs).

## Follow-ups (Optional)

- Package templates as VSIX for one-click install.
- Add CI verification that `.vstemplate` entries map to existing files.
- Add screenshot examples for each template to docs/release notes.
…e-button-on-kryptonform-when-using-a-custom-theme
…e-button-on-kryptonform-when-using-a-custom-theme
…e-button-on-kryptonform-when-using-a-custom-theme
…e-button-on-kryptonform-when-using-a-custom-theme
…e-button-on-kryptonform-when-using-a-custom-theme
…kryptonform-when-using-a-custom-theme' of https://github.com/Krypton-Suite/Standard-Toolkit into 3183-bug-small-square-rendered-next-to-close-button-on-kryptonform-when-using-a-custom-theme
…deserialized in exported XML

This commit fixes an issue where Font properties with no explicit value
(Font == null) were not being correctly handled during XML export
and import.

Null Font values are now explicitly serialized using the "(none)"
sentinel and correctly restored back to null during import, avoiding
ambiguous or unintended default Font creation.

Changes are limited to:
- ExportObjectToElement
- ImportObjectFromElement

Fixes #3164
…ialized/deserialized in exported XML"

This reverts commit d486f4f.
…deserialized in exported XML

This commit fixes an issue where Font properties with no explicit value
(Font == null) were not being correctly handled during XML export
and import.

Null Font values are now explicitly serialized using the "(none)"
sentinel and correctly restored back to null during import, avoiding
ambiguous or unintended default Font creation.

Changes are limited to:
- ExportObjectToElement
- ImportObjectFromElement

Fixes #3164
Font properties with no explicit value (Font == null) were not being
correctly handled during XML export and import.

Null Font values are now explicitly serialized using the "(none)"
sentinel and correctly restored back to null during deserialization,
avoiding ambiguous or unintended default Font creation.

Changes are limited to:
- ExportObjectToElement
- ImportObjectFromElement

Fixes #3164
…zed-depending-of-the-current-culture-in-exported-XML-theme-file
…e-button-on-kryptonform-when-using-a-custom-theme
PWagner1 and others added 12 commits April 25, 2026 08:23
…e-button-on-kryptonform-when-using-a-custom-theme
…e-button-on-kryptonform-when-using-a-custom-theme
Skip conversion when importing Font values marked as "(none)" to ensure
the property is restored as null instead of a default Font instance.

Added comments to clearly document the intent and behavior.
Font properties with no explicit value (Font == null) were not being
correctly handled during XML export and import.

Null Font values are now explicitly serialized using the "(none)"
sentinel and correctly restored back to null during deserialization,
avoiding ambiguous or unintended default Font creation.

Changes are limited to:
- ExportObjectToElement
- ImportObjectFromElement

Fixes #3164
…e-button-on-kryptonform-when-using-a-custom-theme
# Visual Studio Templates (#908)

## Summary

Implements Visual Studio item/project template support for Krypton,
enabling users to create Krypton-first forms and projects directly via
**New Item** and **New Project** workflows.

This addresses the feature request in
[#908](#908).

## Why

Previously, users typically started from standard WinForms templates and
converted forms to Krypton manually. This change reduces setup friction
and makes Krypton a first-class starting point in Visual Studio.

## What Changed

### 1. Added Templates Directory Structure

Created a new top-level `Templates/` directory containing:

- item templates
- project templates
- installation/readme guidance

### 2. Added Item Templates

- `KryptonForm` item template
  - Generates a `KryptonForm` partial class and designer file.
- `KryptonRibbonForm` item template
- Generates a `KryptonForm` with a pre-configured `KryptonRibbon`
control.

### 3. Added Project Templates

- `KryptonWinFormsApp` project template
  - New WinForms app with `MainForm : KryptonForm`.
- `KryptonRibbonWinFormsApp` project template
- New WinForms app with `MainForm : KryptonForm` and a ribbon pre-added.

### 4. Standardized Template Target Framework

Updated project templates to default to:

- `net10.0-windows`

### 5. Added GitHub Workflow for Template Release Assets

Added `.github/workflows/templates-release.yml` to:

- package template folders into Visual Studio-compatible zip assets,
- upload artifacts on workflow runs,
- publish/update GitHub Release assets per branch channel.

Branch/channel behavior:

- `master` -> `templates-stable`
- `canary` -> `templates-canary`
- `alpha` -> `templates-alpha`
- `V105-LTS` -> `templates-lts`
- manual non-standard branch -> `templates-<sanitized-branch>`
(prerelease)

Kill switch support:

- repository variable `TEMPLATES_RELEASE_DISABLED=true`

### 6. Added Comprehensive Developer Documentation

Created:

- `Documents/Development/Visual-Studio-Templates-Developer-Guide.md`

This includes architecture, maintenance workflow, release automation
details, troubleshooting, and extension guidance.

Also updated:

- `Templates/README.md` to include a maintainer doc link.

## Files Added/Updated (High Level)

- Added: `Templates/ItemTemplates/*`
- Added: `Templates/ProjectTemplates/*`
- Added: `Templates/README.md`
- Added: `.github/workflows/templates-release.yml`
- Added:
`Documents/Development/Visual-Studio-Templates-Developer-Guide.md`

## Testing Plan

### Manual Validation (Visual Studio)

- [ ] Zip each template folder with `.vstemplate` at archive root.
- [ ] Copy item template zips to VS ItemTemplates folder.
- [ ] Copy project template zips to VS ProjectTemplates folder.
- [ ] Restart Visual Studio.
- [ ] Confirm templates appear in:
  - [ ] Add New Item (`Krypton Form`, `Krypton Ribbon Form`)
- [ ] Create New Project (`Krypton WinForms App`, `Krypton Ribbon
WinForms App`)
- [ ] Instantiate each template and ensure files are generated
correctly.
- [ ] Build generated projects successfully on `net10.0-windows`.

### Workflow Validation

- [ ] Run `Templates Release` via `workflow_dispatch`.
- [ ] Confirm workflow artifacts include all expected zip files.
- [ ] Confirm release tag/channel updated with latest assets.
- [ ] Verify stable channel is latest only for `master`.

## Risks / Considerations

- Visual Studio template packaging is sensitive to zip root structure;
`.vstemplate` must be at archive root.
- Workflow depends on GitHub release permissions (`contents: write`) and
repository action variables.
- `KryptonRibbonForm` is a template concept (form + ribbon setup), not a
framework class with that exact type name.

## Backward Compatibility

- No runtime breaking API changes in Krypton libraries.
- Changes are additive (new templates + workflow + docs).

## Follow-ups (Optional)

- Package templates as VSIX for one-click install.
- Add CI verification that `.vstemplate` entries map to existing files.
- Add screenshot examples for each template to docs/release notes.
…e-button-on-kryptonform-when-using-a-custom-theme
#3263)

…g a custom theme

# PR Description - #3183

## Summary
Fix a rendering artifact (a small square) appearing next to the
`KryptonForm` Close (X) button when using a custom XML-based Krypton
theme/palette.

## Root Cause
When importing a custom palette from XML, palette values that are
omitted by the theme XML could remain at placeholder/default C# values
instead of being initialized from the palette's `BasePalette`. This
could leave caption/button chrome in an invalid/partial state, producing
a small stray visual element.

## Changes
In `KryptonCustomPaletteBase.ImportFromXmlDocument`, the palette is now
populated from `BasePalette` before applying the XML overrides:
- Call `PopulateFromBaseOperation(null)` before importing the
`Properties` / `Images` elements from the XML.

## Why this works
The initial populate step ensures missing metrics/draw settings
(including caption/button related values used by the form window
buttons) are correctly inherited from the base palette. The subsequent
XML import can then override only what the theme explicitly defines.

## Files Modified
- `Source/Krypton Components/Krypton.Toolkit/Controls
Toolkit/KryptonCustomPaletteBase.cs`

## Testing
- Repro: apply a custom theme (e.g. `Microsoft365Pink`) to a
`KryptonForm` and verify the small square near the Close button is gone.
- Sanity: verify built-in palettes are unaffected.

## Notes
- A full `dotnet build` was not clean in this environment due to
pre-existing MSBuild/resource configuration errors unrelated to this
palette change.

<img width="692" height="259" alt="image"
src="https://github.com/user-attachments/assets/ad447aae-98d0-4b04-901e-2071ceaf4d94"
/>
* Patch for the AIO NuGet package
* Patch for the AIO NuGet package
@github-actions
github-actions Bot requested a review from a team as a code owner April 28, 2026 01:29
@PWagner1
PWagner1 merged commit 8d94930 into alpha-backup Apr 28, 2026
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants