Replies: 1 comment 1 reply
-
|
Thanks for the feedback. This behavior is intentional and documented.
This default is based on common desktop GUI conventions. In labels, buttons, menus, check boxes, and similar static captions, This is also consistent with WPF and Avalonia. In default templates for controls such as MewUI also provides overloads for this distinction:
I do not think the possibility that a caller may be unaware of a documented parameter is enough reason to change the default. The behavior is explicit in the overload signature and XML documentation, and the API provides a direct opt-out path for literal text: Content(text, accessKey: false)Alternatively, callers can provide an explicit content element instead. This may be a matter of API design preference, but for MewUI the current default is a valid choice based on the intended use of this overload and common desktop GUI caption conventions. If there are concrete cases where literal underscore text is commonly used in the Content property of these controls, I am open to reviewing them. Otherwise, I would keep the current default. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The current design relies on character prefix recognition for AccessKey, and the
Contentmethod has a default value ofaccessKey = true. If an unaware user passes user-input text directly to theContentmethod, this could lead to a bug in certain edge cases, and it would be difficult for the user to detect this bug through testing.Beta Was this translation helpful? Give feedback.
All reactions