Skip to main content

MonthCellControl Class

Visualizes a Month View cell.

Namespace: DevExpress.Xpf.Scheduling.Visual

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

NuGet Package: DevExpress.Wpf.Scheduling

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>

Inheritance

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