Make control binding more easily
Cricle opened this issue · 0 comments
Cricle commented
Current need to use this method to bind dynamically combined text.
<TextBlock DataContext="{Binding ElementName=Tbx}">
<TextBlock.Text>
<l:Lang Key="F1">
<l:LangArgument Value="{Binding DataContext.Text}"/>
</l:Lang>
</TextBlock.Text>
</TextBlock>
But I think he can write like this
<TextBlock>
<TextBlock.Text>
<l:Lang Key="F1">
<l:LangArgument Value="{Binding ElementName=Tbx,Path=Text}"/>
</l:Lang>
</TextBlock.Text>
</TextBlock>