Back in 2003 I started to work on a library to use on my line of business applications to address the short-comings around Persian calendar and date controls with proper RightToLeft support. My needs were simple. I was developing business application that needed to be multi-lingual with correct rendering and date displays. Not much to ask, but even simple things like date calculations was not possible as there was not Persian calendar out of the box in .NET framework 1.1.

Fast-forward 13 years and things have changed quite a bit. Not only Microsoft added Persian Calendar on .NET Framework 2.0 but years after they finally changed its behavior.aspx) in .NET Framework 4.6 so that the calculations are correct and consistent with the date calculations of Windows 10. This means more controls and libraries will start supporting the calendar just like libraries like NodaTime already has.

The Road Map

Farsi Library had its own date calculations based on the algorithm from day one. Even with proper support out of the box in .NET Framework, you still need things like helper functions and controls to make dates easier to work with.

On the control side of things, although I have had basic controls like Calendars and Date Pickers, component vendors like DevExpress provide vast array of controls, all of which now come with RightToLeft support. Now that doesn’t mean you can use them directly in your business application but it gives you a good foundation to build what you need.

I have decided to work on ‘extension’ controls off 3rd party components rather than developing new controls. This means that you will take a dependency on a 3rd party control like Telerik or DevExpress but if you are developing business application and need a sophisticated custom control like a Scheduler, changes are you already use a 3rd party control anyway.

New Releases

All the updates going forward are published through Nuget. Historically, only date calculation assembly was available on Nuget but from now on you can find the following packages:

  • FarsiLibrary.Utils for date calculations and helper functions
  • FarsiLibrary.Win for Windows Forms specific controls
  • FarsiLibrary.WPF for WPF based controls and themes
  • Farsi.Library.Win.DevExpress for extended controls that add Persian calendar support to DevExpress controls.

DevExpress controls package is updated to target v15.1 but you will need a DevExpress licence and accesss to use them with as they are not bundled together. More DevExpress controls will be available with proper Persian Calendar support.

Release 2.6 Now Available

This is for the most part a maintanance release and an update to target .NET Framework 4.6.

There is only one breaking change in this release. The name “Resources” turns out to be a undocumented reserved-word in WPF and that broke Visual Studio designer support for WPF projects. As such, I had to rename the FarsiLibrary.Resources.dll to FarsiLibrary.Localization.dll.

There’s also a new build system using FAKE (F# Make) scripts and old custom MSBuild scripts are removed from the solution. This means you can easily grab the source code from GitHub and run the Build.cmd from the command prompt to build everything from the source code.