2012-05-04 33 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

相關問題