2012-05-04 13 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(マンゴー)以降のためにプログラミングされていると仮定すると、あなたはあなたのApplication.Resourcesタグ内に次のコードを追加し、必要に応じてカスタマイズし、あなたのApp.xamlファイルでStyleを使用することができます。スタイルはアプリケーションのすべてのページに適用されます(対応する要素タグ内の個々のプロパティを直接オーバーライドできます)。

<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

関連する問題