question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Language Binding does not update when value of binded property changes

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ghost1372commented, Sep 1, 2021

This code was written by Nabian I do not know much this is supported or not, But i think you should use a INotifyPropertyChanged and {ex:Lang Key={Binding BindingProperty, UpdateSourceTrigger=PropertyChanged}}

Shall I create issue on ‘HandyControl’ ?

Yes

0reactions
DineshSolankicommented, Sep 1, 2021

This code was written by Nabian I do not know much this is supported or not, But i think you should use a INotifyPropertyChanged and {ex:Lang Key={Binding BindingProperty, UpdateSourceTrigger=PropertyChanged}}

Shall I create issue on ‘HandyControl’ ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bound property not updating upon change
The main problem is that Blazor just isn't going to update the textbox if it thinks its value hasn't changed. Part of this...
Read more >
MVVM binding is not updating UI element
Hi everyone, my issue is I don't update the user interface (TextBlock). In summary: by executing a method under translation (ImportData, ...
Read more >
WPF and Notifying Property Change
This is the mechanism by which the model (the thing being bound to) notifies the GUI that it should ask for an updated...
Read more >
The UpdateSourceTrigger property
This behavior is controlled by a property on the binding called UpdateSourceTrigger. It defaults to the value "Default", which basically means that the...
Read more >
MVVM problems, having troubles with data bindings ...
The response is received and parsed. The VM changes a property based on the response. A Label has bound its content to that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found