MonthCellControl Class
Visualizes a Month View cell.
Namespace: DevExpress.Xpf.Scheduling.Visual
Assembly: DevExpress.Xpf.Scheduling.v19.2.dll
Declaration
Remarks
The control uses the MonthCellDatePresenter to display a date within the cell. The control’s public properties allow you to specify date formats and change the border color and thickness used to indicate the current date.
Example
This example defines a custom MonthCellControl style which sets the MonthCellDatePresenter‘s font size, specify formats to display a date in a MonthView cell and changes the color used to highlight the current date.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/monthcellcontrol-a-custom-style-example-t606303.
<Style x:Key="MonthCellControlStyle" TargetType="dxschv:MonthCellControl">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<dxschv:MonthCellDatePresenter
Margin="3"
FontSize="10"
WordWrap="True"/>
</DataTemplate>
</Setter.Value>
</Setter>
<Setter Property="DayStringFormat" Value="Day StringFormat: {0: d}" />
<Setter Property="FirstDayOfMonthStringFormat" Value="First Day Of Month StringFormat: {0: d MMM}" />
<Setter Property="FirstDayOfYearStringFormat" Value="First Day Of Year StringFormat: {0: d MMM, yy}" />
<Setter Property="TodayBorderBackground" Value="Yellow" />
<Setter Property="TodayBorderThickness" Value="10" />
</Style>
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the MonthCellControl class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.