Skip to main content

WorkdaysOptions.LoadHolidays(String, String) Method

Imports holidays from the specified file for the selected location.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v24.2.dll

NuGet Package: DevExpress.Wpf.Charts

Declaration

public void LoadHolidays(
    string fileName,
    string location
)

Parameters

Name Type Description
fileName String

A String value, specifying the file name.

location String

A String value, specifying the location.

Remarks

Apart from the capability to manually populate the collection of holidays (using the WorkdaysOptions.Holidays property), you can call the LoadHolidays method to import holidays in the DevExpress Scheduler (.xml) or Microsoft Office Outlook® (.hol) formats from a file for the specified location.

If you have Microsoft® Outlook installed on your machine, it may be useful to obtain the holidays list which is shipped with its installation. For example, if you’ve installed Microsoft Office® 2007, by default, this file is located in the following path:

C:\Program Files\Microsoft Office\Office12\1033\Outlook.hol

This file contains all known holidays for many countries (marked in square brackets and called locations) in the following format:

[United States] 168

Christmas Day,2006/12/25

Christmas Day,2007/12/25

Christmas Day,2008/12/25

Christmas Day,2009/12/25

Christmas Day,2010/12/25

Christmas Day,2011/12/25

Christmas Day,2012/12/25

Christmas Eve,2006/12/24

So, you can obtain a collection of days which are treated as holidays for the specified country.

See Also