HandyOrg / HandyOrg/HandyControl
Language Binding does not update when value of binded property changes
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
I have used the following way to bind my label
<Label BorderThickness="0" Content="{ex:Lang Key={Binding AppStatus}}"/>
I have the following keys in my Lang.resx = "Idle", "Searching"
whose values are also defined.
Now the Initial value of AppStatus is set to "Idle"
and it shows and changes as I change language, but when I change the value of AppStatus to something else, say
AppStatus = "Searching"
I expected the value on the UI to change as well(to display the localized value of 'Searching'), but it stays on "Idle".
To Reproduce
Steps to reproduce the behavior:
- Bind any control with {ex:Lang Key={Binding BindingProperty}}
- Change the value of 'BindingProperty' to something else from the code
- The display value of the control doesn't change.
Expected behavior
When the value of BindedProperty is changed, I expected it would display the localized string of new value.
Environment (please complete the following information):
- .net: 5.0
- IDE vs2019
- Version 3.3.7
Additional context
changing value from ViewModel
HandyControls issue
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the XAML binding shown in the issue with a ViewModel property changing from "Idle" to "Searching". Trace the language-binding behavior involved and verify the result against the expected localized value; done means the displayed text updates when the bound property changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100