Skip to main content
A newer version of this page is available. .

MonthCellControl Class

Visualizes a Month View cell.

Namespace: DevExpress.Xpf.Scheduling.Visual

Assembly: DevExpress.Xpf.Scheduling.v18.2.dll

Declaration

public class MonthCellControl :
    CellControl

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.

MonthCellControl

<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>

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.

Inheritance

Object
DispatcherObject
DependencyObject
Visual
UIElement
FrameworkElement
ContentPresenter
DevExpress.Xpf.Scheduling.Visual.ChromePresenterBase
CellControl
MonthCellControl
See Also