我有两个带有文本框的列表视图。如果加载后文本框值不同,我想更改文本框的背景颜色。怎么做?
示例XAML是
<ListView Name="lstBase">
<ListView.View>
<DataTemplate>
<TextBox Name="txtBase" Text="{Binding BaseText}" Width="160" BorderThickness="0.5" BorderBrush="Black"/>
</DataTemplate>
</ListView.View>
</ListView>
<ListView Name="lstTarget">
<ListView.View>
<DataTemplate>
<TextBox Name="txtTarget" Text="{Binding TargetText}" Width="160" BorderThickness="0.5" BorderBrush="Black"/>
</DataTemplate>
</ListView.View>
</ListView>
答案 0 :(得分:0)
<ListView>
<TextBox Background="black" Height="20" Width="90"/>
</ListView>