Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CalendarWeeks in WPF Datepicker

As the title of my question says: Is there a possibility to show the correspodending CalendarWeek in the WPF DatePicker-Control?

With WinForms there was the possibility to show it on the left-hand-side of the calendar. How to achieve this in WPF?

UPDATE: Thanks to the good answer of Mare Infinitus I were able to find the correct (working for me) solution in the blog of Charles Petzold.

I just had to change the logic to calculate the weeknumber to pass iso-standards! :)

like image 228
basti Avatar asked Mar 05 '26 00:03

basti


1 Answers

First of all: Yes, it is possible:

Here is the sourcecode that you wanted: Datepicker final with calender weeks

Please take a look on the WeekColumnVisibility property.

For your interest, here is more information on Customizing the New WPF Calendar Controls

here is a SO on determining the week of the year (quite easy in the end)

Here is some detailed information what to do with such a control. Introducing the WPF 4 Calender Control

and, if you like it, here are some quick and hands on examples on calenders at WPF Tutorial

like image 133
Mare Infinitus Avatar answered Mar 07 '26 13:03

Mare Infinitus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!