2012-05-04 35 views

回答

3

这是什么样式。您可以在app.xaml文件中添加样式。喜欢的东西:

<Application.Resources> 
    <Style TargetType="TextBlock"> 
     <Setter Property="Foreground" Value="White" /> 
    </Style> 
    <Style TargetType="TextBox"> 
     <Setter Property="Foreground" Value="White" /> 
    </Style> 
</Application.Resources> 
+0

完美地工作!谢谢! – Andrzej

1

假设你对编程的Windows Phone 7.1(芒果)或更高版本,你可以在你App.xaml文件使用Style,添加以下代码你Application.Resources标签中,并根据需要定制。样式将应用于应用程序中的所有页面(您仍然可以直接在相应的元素标签中覆盖单个属性)。

<Application.Resources> 
    <Style TargetType="Button"> 
     <Setter Property="Foreground" Value="Red"/> 
     <Setter Property="FontSize" Value="20"/> 
    </Style> 
    <Style TargetType="TextBlock"> 
     <Setter Property="Foreground" Value="Blue" /> 
    </Style> 
</Application.Resources> 
+0

哇!谢谢!我不认为这会很容易!完美的作品! – Andrzej

相关问题