Hyperlink text value in .resw resources

心已入冬 提交于 2019-12-11 10:22:43

问题


I got problem with localizing my Windows Phone 8.1 application. I would like to create checkbox with text "I accept rules", where "rules" is hiperlink to another view. I've no idea how to bind word "rules" with my .resw file.

<CheckBox>
  <TextBlock TextWrapping="WrapWholeWords" x:Uid="/RegisterPage/RulesAccept">
     <Hyperlink NavigateUri="" x:Uid="/RegisterPage/RulesAcceptHyperlink"/>
  </TextBlock>
</CheckBox>

Now, RulesAccept is "I accept" and "RulesAcceptHyperlink" is "rules" but in my application word "rules" is not visible.


回答1:


Try like this:

<TextBlock TextWrapping="WrapWholeWords">
    <Run x:Uid="RulesAccept"/>
    <Hyperlink NavigateUri="">
       <Run x:Uid="RulesAcceptHyperlink"/>
    </Hyperlink>
</TextBlock>

Then in Resources.resw file specify which properties should change:

RulesAccept.Text = "I accept"

RulesAcceptHyperlink.Text = "rules"

You can find more about Localization here at MSDN.



来源:https://stackoverflow.com/questions/27595819/hyperlink-text-value-in-resw-resources

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!