【发布时间】:2014-03-28 10:35:00
【问题描述】:
我在 wpf 中有一个文本框,定义如下:
<TextBox Grid.Column="4" Grid.Row="1" x:Name="InputDirectory" Margin="2" Background="Gray"/>
当我运行应用程序时,它不显示插入符号,如果我删除背景颜色或将其更改为其他颜色(我测试了白色、黑色和蓝色),插入符号就会出现。
如何确保在背景为灰色时出现插入符号?
【问题讨论】:
-
stackoverflow.com/questions/9290667/textbox-caret-styling 可能会有所帮助 - 如果插入符号与背景颜色相同,则需要更改插入符号颜色。