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

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

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

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

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

Inheritance

Object
BindableObject
Element
NavigableElement
VisualElement
View
DevExpress.Maui.Core.Internal.DXViewElement
See Also