2017-08-27 15 views

答えて

4

あなたの場合のように、それはItemsControlForegroundによって上書きされます。したがって、あなたのApp.xamlに以下を追加する必要があります。 ItemContainerStyleをサポートしているあなたはListViewなど、より高度なItemsControlを扱っている

<Style TargetType="ItemsControl"> 
    <Setter Property="Foreground" Value ="HotPink"/> 
</Style> 

、あなたの代わりにその項目のコンテナ(すなわちListViewItem)にTargetTypeを設定する必要があります。

<Style TargetType="ListViewItem"> 
    <Setter Property="Foreground" Value ="HotPink"/> 
</Style> 
+2

これは私にとってもうまくいきます。 – AntiHeadshot

関連する問題