HandyControl icon indicating copy to clipboard operation
HandyControl copied to clipboard

[Suggestion] When InfoElement.ShowClearButton is enabled, the Clear button always occupies a fixed width

Open CodingOctocat opened this issue 5 months ago • 0 comments

Describe the bug

This issue(https://github.com/HandyOrg/HandyControl/issues/1489) has not been resolved. We should set a fixed width for the Clear Button.

Image

Image


Fixed:

  1. [Fixed width mode] The input box always retains the position of the Clear button. Although the input space is reduced, the layout remains unchanged.

This is my solution: https://github.com/CodingOctocat/Firefly/blob/master/Firefly/Styles/FixedHandyControlTextBoxPlusTemplate.xaml https://github.com/CodingOctocat/Firefly/blob/master/Firefly/Styles/FixedHandyControlSearchBarPlusTemplate.xaml https://github.com/CodingOctocat/Firefly/blob/master/Firefly/Styles/FixedHandyControlComboBoxEditableLeftTemplate.xaml Image

  1. [Overlay mode] Another solution is to have the Clear button cover the top, but if the user wants to select text from the right, they will click on the Clear button. So I think [Fixed width mode] is better. (By the way, This is HandyControls 3.6.0 behavior)

Image

Steps to reproduce the bug

Create a input control with InfoElement.ShowClearButton or see the HandyControl Demo.

Expected behavior

No response

Screenshots

No response

NuGet package version

HandyControl 3.5.1

IDE

Visual Studio 2022

Framework type

.Net 9.0

Windows version

Windows 11 (22000)

Additional context

No response

CodingOctocat avatar May 31 '25 05:05 CodingOctocat