Back to Devexpress

AppointmentViewModel Class

maui-devexpress-dot-maui-dot-scheduler-46450e17.md

latest4.6 KB
Original Source

AppointmentViewModel Class

Stores appearance settings for an individual appointment item‘s representation.

Namespace : DevExpress.Maui.Scheduler

Assembly : DevExpress.Maui.Scheduler.dll

NuGet Package : DevExpress.Maui.Scheduler

Declaration

csharp
public class AppointmentViewModel :
    AppointmentViewModelBase

Remarks

The Scheduler View uses this class in the following occurrences:

This view model provides the following settings that you can customize:

Example

This example uses the appointment style and its customizer to modify the cell’s appearance.

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

|

Symbol

|

Description

| | --- | --- | |

DayViewBase.AppointmentAppearance

|

Gets or sets appearance settings of appointments. This is a bindable property.

| |

AppointmentAppearance

|

Contains a scheduler’s appointment appearance properties.

| |

AppointmentAppearance.Customizer

|

Gets or sets the object that customizes the appointment’s appearance depending on internal logic. This is a bindable property.

| |

IAppointmentCustomizer

|

If implemented by a class, modifies appearance settings of individual appointments.

| |

IAppointmentCustomizer.Customize(AppointmentViewModel)

|

Modifies appearance settings of an individual appointment.

| |

AppointmentViewModel

|

Stores appearance settings for an individual appointment item‘s representation.

|

Implements

INotifyPropertyChanged

INotifyPropertyChanging

Inheritance

System.Object DevExpress.Maui.Scheduler.Internal.NotifyPropertyChangedBase ItemViewModel AppointmentViewModelBase AppointmentViewModel

Extension Methods

Yield<AppointmentViewModel>()

YieldIfNotNull<AppointmentViewModel>()

See Also

AppointmentViewModel Members

DevExpress.Maui.Scheduler Namespace