[英]WPF Calendar Weekend Coloring
Is there no simple way to coloring Weekend days? 没有简单的方法可以给周末着色吗? In ASP.Net i saw a option with the Event OnDayRender and if Weekend than set BackgroundColor.
在ASP.Net中,我看到了事件OnDayRender和“周末”是否设置了BackgroundColor的选项。 OnDayRender
OnDayRender
But is there nothing similarly in WPF? 但是WPF中没有类似的东西吗? I saw only big solution by overriding Styles and so on..
我通过覆盖样式等仅看到了一个大解决方案。
Here you can find a very nice tutorial on how to style a Calendar control according to your needs. 在这里,您可以找到有关如何根据需要设置Calendar控件样式的非常不错的教程。 Have a look at
Figure 8
, I think you can use the same technique to color Weekend values in your control. 看一下
Figure 8
,我认为您可以使用相同的技术为控件中的Weekend值着色。
Update : I've created a sample project which illustrates a solution to your issue. 更新 :我创建了一个示例项目,该示例项目说明了您的问题的解决方案。 You can find it on my SkyDrive : "CustomizedCalendar".
您可以在我的SkyDrive中找到它:“ CustomizedCalendar”。 Basically you need to play a little bit with the "WeekendDaysConverter".
基本上,您需要使用“ WeekendDaysConverter”来玩一些游戏。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.