HandyOrg / HandyOrg/HandyControl

Language Binding does not update when value of binded property changes

Open
#971 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
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:

  1. Bind any control with {ex:Lang Key={Binding BindingProperty}}
  2. Change the value of 'BindingProperty' to something else from the code
  3. 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

  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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.