HandyOrg / HandyOrg/HandyControl

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

Open
#1,734 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
7.2k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the HandyControl Demo and controls using InfoElement.ShowClearButton, then compare their templates with the referenced FixedHandyControlTextBoxPlusTemplate.xaml, FixedHandyControlSearchBarPlusTemplate.xaml, and FixedHandyControlComboBoxEditableLeftTemplate.xaml files. Done means the Clear button keeps a fixed position when enabled without preventing normal text selection.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.