Back to Devexpress

CellControl Class

wpf-devexpress-dot-xpf-dot-scheduling-dot-visual-5403285b.md

latest3.8 KB
Original Source

CellControl Class

A base class for classes which visualize a time cell in a scheduler view.

Namespace : DevExpress.Xpf.Scheduling.Visual

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

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public abstract class CellControl :
    ChromePresenterBase
vb
Public MustInherit Class CellControl
    Inherits ChromePresenterBase

Example

You can create a data template, define a cell style and assign the style to the appropriate property of the desired view:

The following code demonstrates a custom cell style and template applied to the selected cells of the resource with ID=1. A custom data template displays the time interval contained in the cell’s data context.

View Example

xaml
<Style x:Key="CellControl.Style" TargetType="dxschv:CellControl">
    <Style.Triggers>
        <MultiDataTrigger>
            <MultiDataTrigger.Conditions>
                <Condition Value="1" Binding="{Binding Resource.Id}" />
                <Condition Value="True" Binding="{Binding IsSelected}" />
            </MultiDataTrigger.Conditions>
            <Setter Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel Background="Black">
                            <dxschv:FastTextBlock
                                HorizontalAlignment="Center"
                                Foreground="White"
                                FontSize="10"
                                Text="{Binding Interval}"
                                WordWrap="True" />
                        </StackPanel>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </MultiDataTrigger>
    </Style.Triggers>
</Style>

Inheritance

Show 13 items

Object DispatcherObject DependencyObject Visual UIElement FrameworkElement ContentPresenter DevExpress.Xpf.Scheduling.Visual.ChromePresenterBase CellControl AllDayCellControl

DayCellControl

MonthCellControl

TimelineCellControl

See Also

CellControl Members

DevExpress.Xpf.Scheduling.Visual Namespace