Skip to content

Setting the CheckAlign as TopCenter/BottomCenter/MiddleCenter is not working for RadioButton/CheckBox control with Appearance as ToggleSwitch #14810

Closed

Description

@Zheng-Li01

.NET version

.NET 11.0.100-preview.7.26365.114 + Private dlls built from Net11/Integration-4 branch of https://github.com/KlausLoeffelmann/winforms repo

Did it work in .NET Framework?

Not tested/verified

Did it work in any of the earlier releases of .NET Core or .NET 5+?

Not support, new feature of #14792

Issue description

Setting the CheckAlign as TopCenter/BottomCenter/MiddleCenter is not working for RadioButton/CheckBox control with Appearance as ToggleSwitch

Image
NewIssue.mp4

Steps to reproduce

  1. Create a WinForms application targeting .NET 11
  2. Set VisualStylesMode = VisualStylesMode.Net11
  3. Add a RadioButton/CheckBox control on the Form1.cs[Design] page
  4. Setting the Appearance as ToggleSwitchfor the radioButton1/checkBox1
  5. Change the CheckAlign as TopCenter/BottomCenter/MiddleCenter
  6. Observer the results

Activity

  1. added
    untriaged
    NewApi-Net11
    on Jul 24, 2026
  2. changed the title [-]Setting the CheckAlign as TopCenter/BottomCenter is not working for RadioButton/CheckBox control with Appearance as ToggleSwitch[/-] [+]Setting the CheckAlign as TopCenter/BottomCenter/MiddleCenter is not working for RadioButton/CheckBox control with Appearance as ToggleSwitch[/+] on Jul 24, 2026
  3. self-assigned this
    on Jul 27, 2026
  4. LeafShi1 commented on Jul 27, 2026

    @LeafShi1
    Member

    @KlausLoeffelmann
    From the current implementation it appears that TopCenter / MiddleCenter / BottomCenter CheckAlign values are intentionally not honored when Appearance = ToggleSwitch.

    Is this a deliberate design decision, or should ToggleSwitch fully respect all CheckAlign values?
    I experimented with enabling those alignments, but because the switch glyph is roughly twice as wide as its height, the control can easily become clipped.

    If the current behavior is by design, should we document this limitation in net11-visualstyles-layout-guidance.md?
    If it is considered a product bug, I think we may also want to document that a ToggleSwitch can be clipped if the control size is smaller than its preferred size, and recommend AutoSize or GetPreferredSize().

  5. added
    waiting-on-team
    and removed
    untriaged
    on Aug 4, 2026
  6. KlausLoeffelmann commented on Aug 4, 2026

    @KlausLoeffelmann
    Member

    That was a conscious decision.
    But - it is still a good find, because we should double check, if this is part of the remarks documentation. If not, can you prompt to add the docs to the XML? Thanks!

    Please close, once we know it's docu'd properly!

    Good find!!

  7. removed
    waiting-on-team
    on Aug 11, 2026
  8. Amy-Li03 commented on Aug 20, 2026

    @Amy-Li03
    Contributor

    Tested in the main branch of WinForms repo, TopCenter / MiddleCenter / BottomCenter CheckAlign values are intentionally not honored when Appearance = ToggleSwitch has been documented.

  9. added this to the 11.0-rc1 milestone on Aug 20, 2026
  10. Zheng-Li01 commented on Aug 27, 2026

    @Zheng-Li01
    MemberAuthor

    The TopCenter / MiddleCenter / BottomCenter CheckAlign values are intentionally not honored when Appearance = ToggleSwitch has been documented.

  11. locked and limited conversation to collaborators on Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

NewApi-Net11

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions