Skip to main content

WorkWeekView Class

The View that displays appointments scheduled for a specific work week.

Namespace: DevExpress.Maui.Scheduler

Assembly: DevExpress.Maui.Scheduler.dll

NuGet Package: DevExpress.Maui.Scheduler

Declaration

public class WorkWeekView :
    DayViewBase

Remarks

The image below highlights elements the view includes:

Work Week View Elements

  1. Time Ruler
  2. Time Ruler Cell
  3. Time Ruler Header
  4. Header Item
  5. All Day Area
  6. All Day Appointment
  7. All Day Cell
  8. Appointment
  9. Day Cell

Note

  • The FirstDayOfWeek property specifies the first day of the week.
  • The WorkDays property defines days that belong to a work week.

The following table lists basic settings that configure the view:

Property

Description

ShowWorkTimeOnly

Gets or sets whether the View should show only WorkTime. This is a bindable property.

SnapToCellsMode

Gets or sets how the View snaps the scheduler’s appointments. This is a bindable property.

Example

The following example customizes WorkWeekView cells:

DevExpress Scheduler for MAUI - WorkWeekView - Customize scheduler cell appearance

View Example

<dxsch:WorkWeekView>
    <dxsch:WorkWeekView.DataStorage>
        <dxsch:SchedulerDataStorage>
            <dxsch:SchedulerDataStorage.DataSource>
                <dxsch:DataSource AppointmentsSource="{Binding MedicalAppointments}">
                    <dxsch:DataSource.AppointmentMappings>
                        <dxsch:AppointmentMappings 
                                Id="Id" 
                                Start="StartTime" 
                                End="EndTime" 
                                Subject="Subject"
                                LabelId="LabelId"
                                Location="Location"/>
                    </dxsch:DataSource.AppointmentMappings>
                </dxsch:DataSource>
            </dxsch:SchedulerDataStorage.DataSource>
        </dxsch:SchedulerDataStorage>
    </dxsch:WorkWeekView.DataStorage>
    <!--Customize the date header appearance.-->
    <dxsch:WorkWeekView.HeaderItemAppearance>
        <dxsch:DayViewHeaderItemAppearance BackgroundColor="#dce0ec" 
                                      TodayDayNumberBackgroundColor="#fff7c2"
                                      TodayDayNumberTextColor="{StaticResource redText}"
                                      TodayWeekDayTextColor="{StaticResource redText}"/>
    </dxsch:WorkWeekView.HeaderItemAppearance>

    <!--Customize the time ruler appearance.-->
    <dxsch:WorkWeekView.TimeRulerCellAppearance>
        <dxsch:TimeRulerCellAppearance BackgroundColor="#dce0ec" 
                                  IntervalTickColor="#8e9bbc" IntervalTickLength="15"
                                  SlotTickColor="#8e9bbc" SlotTickLength="7"/>
    </dxsch:WorkWeekView.TimeRulerCellAppearance>
    <dxsch:WorkWeekView.TimeRulerHeaderAppearance>
        <dxsch:TimeRulerHeaderAppearance BackgroundColor="#dce0ec"/>
    </dxsch:WorkWeekView.TimeRulerHeaderAppearance>

    <!--Customize the all-day area appearance.-->
    <dxsch:WorkWeekView.AllDayCellAppearance>
        <dxsch:AllDayAreaCellAppearance BackgroundColor="#f1f1f1" 
                                   TodayBackgroundColor="#fff7c2"/>
    </dxsch:WorkWeekView.AllDayCellAppearance>

    <!--Customize the cell appearance.-->
    <dxsch:WorkWeekView.CellAppearance>
        <dxsch:DayViewCellAppearance WorkTimeBackgroundColor="White"
                                BackgroundColor="#f1f1f1"
                                TodayBackgroundColor="#fff7c2"
                                BorderColor="#bdbdbd"
                                SlotBorderColor="#e1e1e1">
            <dxsch:DayViewCellAppearance.Customizer>
                <local:WorkWeekViewCellCustomizer/>
            </dxsch:DayViewCellAppearance.Customizer>
        </dxsch:DayViewCellAppearance>
    </dxsch:WorkWeekView.CellAppearance>
</dxsch:WorkWeekView>
See Also