Conversation
|
@Karnah @SeriousM @JeremyWu917 @benjaminrupp @ |
|
Does that mean that |
|
@SeriousM <TextBlock>
<TextBlock.Text>
<lex:Loc>KEY</lex:Loc>
</TextBlock.Text>
</TextBlockI think everybody is using this approach and this will still work. <TextBlock Text={lex:Loc KEY} /> |
Ah I see, that's all a newcomer needs and is even more friendly. |
|
LGTM!
I think it allows to avoid breaking changes. Or do you want to make LocBinding more simple? |
| <MultiBinding StringFormat="{}{0}"> | ||
| <Binding Path="tenum" StringFormat="TestEnum_{0}"/> | ||
| </MultiBinding> |
There was a problem hiding this comment.
It is not work as expected. I think it shold be like that:
<MultiBinding StringFormat="{}TestEnum_{0}">
<Binding Path="tenum" />
</MultiBinding>Explanation
And yes, my version looks weird :)
There was a problem hiding this comment.
It is not work as expected. I think it shold be like that:
<MultiBinding StringFormat="{}TestEnum_{0}"> <Binding Path="tenum" /> </MultiBinding>Explanation
And yes, my version looks weird :)
@Karnah
I change the example to avoid this MultiBinding StringFormat Bug. Thanks for the Explanation.
@Karnah in the future I like to deprecate LocBinding. I like if we have in the end nearly one extension Loc that solves all problems. |
|
@konne. yes, you fully right. Looks like it's not possible to use <TextBlock>
<TextBlock.Text>
<lex:Loc>
<lex:Loc.ResourceIdentifierKey>
<MultiBinding StringFormat="{}TestEnum_{0}">
<Binding Path="tenum" />
</MultiBinding>
</lex:Loc.ResourceIdentifierKey>
</lex:Loc>
</TextBlock.Text>
</TextBlock>
<TextBlock>
<TextBlock.Text>
<lex:Loc>
TestEnum_Test1
</lex:Loc>
</TextBlock.Text>
</TextBlock> |
|
@Karnah be honest I always happy to get your feedback and input. For now you can already access the new Binding in the current NameSpace (http://wpflocalizeextension.codeplex.com) with <TextBlock>
<TextBlock.Text>
<lex:Loc>
<lex:Loc.KeyBinding>
<MultiBinding StringFormat="{}TestEnum_{0}">
<Binding Path="tenum" />
</MultiBinding>
</lex:Loc.KeyBinding>
</lex:Loc>
</TextBlock.Text>
</TextBlock>but If you switch to the new namespace that I have introduced you can already use the new syntax that will be introduced in 4.0 (also with all deprecation). |
|
I think your solution is really excellent. Unfortunately, I cannot update package in our projects now. But when I have more time, I will do it. |
|
Hello, any news about this feature? |
This small change have a small breaking change and for me a huge benefit:
breaks:
<lex:Loc>keyName</lex:Loc>feature: