Skip to content

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

@CodingOctocat

Description

@CodingOctocat

Describe the bug

This issue(#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions