2015-06-02 12 views

回答

3

您可以在App.xaml中创建自定义样式基础上,PhoneTextNormalStyle,只是适应的前景,以满足您的需求:

<Style x:Key="RedPhoneTextNormalStyle" BasedOn="{StaticResource PhoneTextNormalStyle}"> 
    <Setter Property="Foreground" Value="Red"/> 
</Style> 

然后适应当前样式调用到新的一个应该是相当容易(搜索&替换)

<TextBlock x:Name="ApplicationTitle" 
        Text="APP NAME" 
        Style="{StaticResource RedPhoneTextNormalStyle}"/> 

使用自定义样式的好处是,你总是可以延长它,如果你需要更多的功能添加到它,以及作为使用它作为其他风格的基地

相关问题