Skip to main content
A newer version of this page is available. .

DXSchedulerPrintAdapter.FirstDayOfWeek Property

Gets or sets the start day of the week used by the print adapter to create a report.

Namespace: DevExpress.Xpf.Scheduler.Reporting

Assembly: DevExpress.Xpf.Scheduler.v19.1.dll

Declaration

public FirstDayOfWeek FirstDayOfWeek { get; set; }

Property Value

Type Description
FirstDayOfWeek

A FirstDayOfWeek enumeration value specifying the day of the week to be the first in a report week.

Available values:

Name Description
System

The start day of the week will be obtained from the regional settings of the operating system.

Sunday

The calendar week will start with Sunday.

Monday

The calendar week will start with Monday.

Tuesday

The calendar week will start with Tuesday.

Wednesday

The calendar week will start with Wednesday.

Thursday

The calendar week will start with Thursday.

Friday

The calendar week will start with Friday.

Saturday

The calendar week will start with Saturday.

Remarks

Important

You are viewing documentation for the legacy WPF Scheduler control. If you’re starting a new project, we strongly recommend that you use a new control declared in the DevExpress.Xpf.Scheduling namespace. If you decide to upgrade an existing project in order to switch to the updated scheduler control, see the Migration Guidelines document.

Example

If all you need to do is to print a schedule based on the data obtained from a data source, and a visible form containing a SchedulerControl and editing capabilities are unnecessary, follow the steps below.

  1. Drop the DocumentPreview control onto the form from the DX.19.1: Reporting toolbox tab.
  2. Create a stand-alone SchedulerStorage, bind it to appointment data and specify standard mappings for appointment properties. This storage will play the role of the data source for a report’s print adapter.
  3. Create a new XtraSchedulerReport object and load the WeeklyStyle template from the gallery of ready-made scheduler report layout templates. To get step-by-step instructions, see the How to: Add XtraSchedulerReport to a WPF Application (legacy) topic.
  4. Drop the DXSchedulerStoragePrintAdapter print adapter onto the form from the DX.19.1: Scheduling toolbox tab. Set its DXSchedulerStoragePrintAdapter.SchedulerStorage property to the previously created SchedulerStorage as the data source for the print adapter.
  5. Use the DXSchedulerPrintAdapter.TimeInterval, DXSchedulerPrintAdapter.FirstDayOfWeek and other options to customize the print adapter.
  6. For advanced customization, a set of Validate* events, such as the DXSchedulerPrintAdapter.ValidateAppointments, DXSchedulerPrintAdapter.ValidateResources, DXSchedulerPrintAdapter.ValidateTimeIntervals, or DXSchedulerPrintAdapter.ValidateWorkTime can be helpful. In this example, handle the ValidateAppointments event to filter appointments and display only recurring ones.
  7. Specify the scheduler print adapter for the report via the XtraSchedulerReport.SchedulerAdapter and DXSchedulerPrintAdapter.SchedulerAdapter properties.
  8. Call the XtraReport.CreateDocument method to create a report document, so it can be displayed or printed.
  9. Finally, create an instance of the XtraReportPreviewModel class with the passed report that has been previously created. Set this preview model to the DocumentPreview.Model property of the DocumentPreview control located on the form.

The following code illustrates the technique described above.

<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dxsch="http://schemas.devexpress.com/winfx/2008/xaml/scheduler" 
        xmlns:dxp="http://schemas.devexpress.com/winfx/2008/xaml/printing" 
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <dxsch:SchedulerStorage x:Name="storage">
            <dxsch:SchedulerStorage.AppointmentStorage>
                <dxsch:AppointmentStorage>
                    <dxsch:AppointmentStorage.Mappings>
                        <dxsch:AppointmentMapping 
                                    Start="StartTime" 
                                    End="EndTime" 
                                    AllDay="AllDay"
                                    Description="Description"
                                    Label="Label"
                                    Location="Location"
                                    Subject="Subject" 
                                    RecurrenceInfo="RecurrenceInfo"
                                    ReminderInfo="ReminderInfo"
                                    Status="Status"
                                    Type="EventType"/>
                    </dxsch:AppointmentStorage.Mappings>
                </dxsch:AppointmentStorage>
            </dxsch:SchedulerStorage.AppointmentStorage>
        </dxsch:SchedulerStorage>
        <dxsch:DXSchedulerStoragePrintAdapter x:Name="printAdapter"/>
        <dxp:DocumentPreview x:Name="documentPreview" 
                             VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
        </dxp:DocumentPreview>
    </Grid>
</Window>
See Also