DatePicker 日期颜色 WPF 4
在资源字典中设置后,我在字典中的文本块具有以下样式
<Style TargetType="{x:Type TextBlock}">
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="5,0,0,0 "/>
<Setter Property="Foreground" Value="White" />
</Style>
,我在项目中使用的所有文本块的前景色都为我设置的白色,现在的问题是打开时的日期选择器控件仅显示所选日期,因为我已将上述样式中的文本块的前景色设置为白色,因此日期选择器控件日期不显示。请尽快帮助我,因为我陷入了这个问题:(
I have the following style for the text block in the dictionary
<Style TargetType="{x:Type TextBlock}">
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="5,0,0,0 "/>
<Setter Property="Foreground" Value="White" />
</Style>
after setting this in the resource dictionary, all the text block i have used in my project have foreground color to white which I have set, now the problem is that the datepicker control when open only shows the selected date, as I have set the foreground color of white for the text block in the above style the date picker control dates are not showing. Please help me as soon as possible as I am stuck in this problem :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以为 DatePicker 使用其他样式:
You can use additional style for your DatePicker: