Back to Devexpress

AppointmentStyle Class

mobilecontrols-devexpress-dot-xamarinforms-dot-scheduler-ec197b02.md

latest4.8 KB
Original Source

AppointmentStyle Class

The storage of appointment item appearance settings.

Namespace : DevExpress.XamarinForms.Scheduler

Assembly : DevExpress.XamarinForms.Scheduler.dll

NuGet Package : DevExpress.XamarinForms.Scheduler

Declaration

csharp
public class AppointmentStyle :
    ItemStyle

The following members return AppointmentStyle objects:

Remarks

The DayView, WorkWeekView and WeekView, MonthView use this class to store all day appointments’ and regular appointments’ settings:

  1. Regular Appointment in the Day-based View
  2. All-Day Appointment in the Day-based View
  3. Appointment in the Month View

The style provides the following settings that manage an appointment’s appearance:

Example

This example demonstrates how to use the appointment style and its customizer to modify the cell’s appearance.

xml
<dxs:WorkWeekView.AppointmentStyle>
    <dxs:AppointmentStyle
        BorderThickness="2"
        BorderColor="#808080"
        ContentPadding="8">
        <dxs:AppointmentStyle.TextStyle>
            <dxs:TextStyle Color="Black"/>
        </dxs:AppointmentStyle.TextStyle>
        <dxs:AppointmentStyle.Customizer>
            <views:AppointmentCustomizer/>
        </dxs:AppointmentStyle.Customizer>
    </dxs:AppointmentStyle>
</dxs:WorkWeekView.AppointmentStyle>
csharp
class AppointmentCustomizer : IAppointmentCustomizer {
    public void Customize(AppointmentViewModel appointment) {
        if (appointment.VisibleInterval.Contains(DateTime.Now)) {
            appointment.BackgroundColor = Color.Orange;
        }
    }
}

|

Symbol

|

Description

| | --- | --- | |

DayViewBase.AppointmentStyle

|

Gets or sets appearance settings of appointments.

| |

AppointmentStyle

|

The storage of appointment item appearance settings.

| |

AppointmentStyle.Customizer

|

Gets or sets the object that customizes the appointment appearance depending on internal logic.

| |

IAppointmentCustomizer

|

The interface that should implement a class that modifies appearance settings of individual appointments.

| |

IAppointmentCustomizer.Customize(AppointmentViewModel)

|

Modifies appearance settings of an individual appointment.

| |

AppointmentViewModel

|

The storage for appearance settings values of an individual appointment item‘s representation.

|

Inheritance

Object DevExpress.XamarinForms.Scheduler.Internal.SchedulerElement ItemStyle AppointmentStyle

See Also

AppointmentStyle Members

DevExpress.XamarinForms.Scheduler Namespace