开发者

Modify the WPF Calendar control in Visual Studio 2010

I'm just starting out with WPF + C# in Visual Studio 2010.

I've added the standard calendar control to my project, and I want to disable/remove the month left & right buttons.

I couldn't achieve this using the properties of the control, so I did a bit of resea开发者_开发百科rch - it sounds like I'll have to replace the standard template with a modified one of my own creation.

But how do I modify the standard template? I can't find a way to access it.

Or is there a better way to achieve my goal?


If you want to allow selecting only dates from the current month, use something like:

<Calendar DisplayDateStart="2010/08/01" DisplayDateEnd="2010/08/31" />

Of course, you will probably want to set those dates from code-behind or using binding.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜