Question

I need to use the control System.Windows.Controls.Calendar to display the Hijri Dates and to display the Gregorian dates as well in the same window.

I have tried thread Culture, but the result was all of the calenders were changed, and the change was only on the header of the Calender Control, i.e. the dates written on the grid of numbers are still the same.

I have tried to use a custom user control, an open source project programmed by somebody, but I have found too many problems and these project were hard to customize, so I need to use the native controls, with the native way of dealing with controls..

Was it helpful?

Solution

According to MSDN the System.Windows.Controls.Calendar does only support the Gregorian calendar - so basically doing what you want is impossible using the built-in control...

You will need to build such a control yourself or buy some control pack with Hijri support...

For some information on dealing with Hijri dates in .NET see MSDN.

EDIT:

The only calendar controls supporting Hijri I could find are here and here and here.

The "bigger" vendors in the .NET control world (like Telerik, DevExpress...) do NOT support hijri... they all have some "issue tracking" saying that they will look into adding support but these issues are open for years without any progress so far :-(

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top