我的Win10 UAP中有按钮样式。风格有工具提示。
如何在resx字符串资源中创建此样式引用文本?
<Style x:Key="MyButtonStyle" TargetType="Button" >
...
<Setter Property="ToolTipService.ToolTip" Value="<string in resx resources>" />
</Style>
答案 0 :(得分:1)
你好在UWP中最好使用.resw而不是.resx。以下是使用.resw资源的方法:
<Style x:Key="CustomButtonStyle" TargetType="Button">
<Setter Property="ToolTipService.ToolTip">
<Setter.Value>
<TextBlock x:Uid="CustomText" />
</Setter.Value>
</Setter>
</Style>
我的.resw文件如下所示: 名称 - &gt; CustomText.Text
价值 - &gt;这是自定义文字