You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Setting the CheckAlign as TopCenter/BottomCenter/MiddleCenter is not working for RadioButton/CheckBox control with Appearance as ToggleSwitch #14810
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
@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().
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!
Tested in the main branch of WinForms repo, TopCenter / MiddleCenter / BottomCenter CheckAlign values are intentionally not honored when Appearance = ToggleSwitch has been documented.
Activity
[-]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[/+]LeafShi1 commentedon Jul 27, 2026
@KlausLoeffelmann
From the current implementation it appears that
TopCenter / MiddleCenter / BottomCenterCheckAlign values are intentionally not honored whenAppearance = ToggleSwitch.Is this a deliberate design decision, or should
ToggleSwitchfully respect allCheckAlignvalues?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
AutoSizeorGetPreferredSize().KlausLoeffelmann commentedon Aug 4, 2026
That was a conscious decision.
But - it is still a good find, because we should double check, if this is part of the
remarksdocumentation. 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!!
Amy-Li03 commentedon Aug 20, 2026
Tested in the main branch of WinForms repo, TopCenter / MiddleCenter / BottomCenter CheckAlign values are intentionally not honored when Appearance = ToggleSwitch has been documented.
Zheng-Li01 commentedon Aug 27, 2026
The TopCenter / MiddleCenter / BottomCenter CheckAlign values are intentionally not honored when Appearance = ToggleSwitch has been documented.