Back to Devexpress

DayViewCellStyle Class

mobilecontrols-devexpress-dot-xamarinforms-dot-scheduler-9b521ec9.md

latest5.4 KB
Original Source

DayViewCellStyle Class

The storage for the day view cell appearance settings.

Namespace : DevExpress.XamarinForms.Scheduler

Assembly : DevExpress.XamarinForms.Scheduler.dll

NuGet Package : DevExpress.XamarinForms.Scheduler

Declaration

csharp
public class DayViewCellStyle :
    CellStyle

The following members return DayViewCellStyle objects:

Remarks

The DayView, WorkWeekView and WeekView use this class to store all settings of day area cells. The style configures the following cell types:

  1. TimeScaleInterval defines scale intervals into which the view splits its time interval (the whole day or WorkTime only). Slots divide intervals into cells (2, 3). The TimeScaleSlotCount property specifies the number of slots within a scale interval.
  2. Interval Day View Cell - a cell that corresponds to the first slot in a scale interval.
  3. Slot Day View Cell - all other cells.
  4. Work Time Day View Cell - a cell within the WorkTime interval. These cells can be either Interval or Slot.
  5. Today Time Day View Cell. These cells can be either Interval or Slot.

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

Example

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

xml
<dxs:WorkWeekView.CellStyle>
    <dxs:DayViewCellStyle 
        LeftBorderThickness="2"
        BottomBorderThickness="2"
        BorderColor = "#e1e1e1"
        SlotBorderColor="#f0f0f0"
        BackgroundColor="#f5f5f5"
        WorkTimeBackgroundColor="White"
        TodayBackgroundColor="#4fc3f7">
        <dxs:DayViewCellStyle.Customizer>
            <views:DayViewCellCustomizer/>
        </dxs:DayViewCellStyle.Customizer>
    </dxs:DayViewCellStyle> 
</dxs:WorkWeekView.CellStyle>
csharp
class DayViewCellCustomizer : IDayViewCellCustomizer {
    public void Customize(DayViewCellViewModel cell) {
        if (cell.Interval.Start.DayOfWeek == DayOfWeek.Friday) {
            cell.BackgroundColor = Color.Blue;
        }
    }
}

|

Symbol

|

Description

| | --- | --- | |

DayViewBase.CellStyle

|

Gets or sets appearance settings of cells.

| |

DayViewCellStyle

|

The storage for the day view cell appearance settings.

| |

DayViewCellStyle.Customizer

|

Gets or sets the object that customizes the day view cell’s appearance depending on internal logic.

| |

IDayViewCellCustomizer

|

The interface that should implement a class that modifies appearance settings of individual Day View cells.

| |

IDayViewCellCustomizer.Customize(DayViewCellViewModel)

|

Modifies appearance settings of an individual Day View cell.

| |

DayViewCellViewModel

|

The storage for appearance settings values of an individual day view cell‘s representation.

|

Inheritance

Object DevExpress.XamarinForms.Scheduler.Internal.SchedulerElement ItemStyle CellStyle DayViewCellStyle

See Also

DayViewCellStyle Members

DevExpress.XamarinForms.Scheduler Namespace