HandyOrg / HandyOrg/HandyControl

AutoCompleteTextBox 控件的文本内容无法双向绑定

Open
#1,492 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

模板内部的 PART_SearchTextBox 文本框没有绑定 Text={TemplateBinding Text}
而是通过TextChanged 事件来通知控件文本发生改变

因此设置控件的 Text属性是无效的

Steps to reproduce the bug
    <hc:AutoCompleteTextBox ItemsSource="{Binding Items}" Text="{Binding SearchText}" />
Expected behavior

No response

Screenshots

No response

NuGet package version

None

IDE

No response

Framework type

No response

Windows version

No response

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 AutoCompleteTextBox template and its PART_SearchTextBox, then reproduce the issue using the provided ItemsSource and Text binding snippet. Trace how the TextChanged event currently reports changes and verify that the control's Text property can both update the displayed text and propagate user edits back to SearchText.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.