samc
Topic Author
Posts: 74
Joined: 21 Aug 2019, 19:22

Localization and ChangePropertyAction

16 Nov 2023, 19:06

I'm trying to change the text of a target using a ChangePropertyAction like this:
<b:ChangePropertyAction TargetName="Status" PropertyName="Text" Value="{noesis:Loc Text.FrontEnd.AddFriend.Label.InvalidFormat}"/>
However, this seems to always make the text into an empty string.

Is there another / valid way to do this?

thanks,
sam
 
User avatar
sfernandez
Site Admin
Posts: 3001
Joined: 22 Dec 2011, 19:20

Re: Localization and ChangePropertyAction

17 Nov 2023, 19:38

The current implementation of Loc extension only works for properties of FrameworkElements in the tree, because it uses the dictionary from the LocExtension.Resources inherited property. Could you please report this in our bugtracker, we want to analyze how we could add support for that.

In the meantime, could you try doing the following:
<TextBlock x:Name="txt" ... Tag="{noesis:Loc Text.FrontEnd.AddFriend.Label.InvalidFormat}"/>
...
    <b:ChangePropertyAction TargetName="Status" PropertyName="Text" Value="{Binding Tag, ElementName=txt}"/>
 
David Jefferies
Posts: 27
Joined: 14 Jan 2021, 17:09

Re: Localization and ChangePropertyAction

05 Apr 2024, 15:26

We have the same issue - has there been any progress adding support for this?
 
User avatar
sfernandez
Site Admin
Posts: 3001
Joined: 22 Dec 2011, 19:20

Re: Localization and ChangePropertyAction

10 Apr 2024, 11:02

I've created ticket #3226 to track development of this feature.
For the moment there's been no progress, sorry.

Can you use the proposed workaround or is not an option for you?

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Semrush [Bot], tandr and 3 guests