Skip to main content

SchedulerViewBase.TimeRegionContentTemplate Property

Specifies the template that defines the presentation of time regions. This is a dependency property.

Namespace: DevExpress.Xpf.Scheduling

Assembly: DevExpress.Xpf.Scheduling.v24.1.dll

NuGet Package: DevExpress.Wpf.Scheduling

Declaration

public DataTemplate TimeRegionContentTemplate { get; set; }

Property Value

Type Description
DataTemplate

A System.Windows.DataTemplate object that defines the presentation of time regions.

Remarks

Use the TimeRegionContentTemplateSelector to choose the time region template based on custom logic.

The XAML snippet below illustrates how to add an image to time regions.

 <dxsch:SchedulerControl> 
    <!--define a custom template that adds an icon to time regions--> 
    <dxsch:SchedulerControl.Resources> 
        <DataTemplate x:Key="lunchRegionTemplate">
            <Image MaxHeight="28"
            Source="{dx:SvgImageSource Uri='pack://application:,,,/DevExpress.Images.v19.2;component/SvgImages/Icon Builder/Travel_Restaurant.svg'}" />
        </DataTemplate> 
    </dxsch:SchedulerControl.Resources> 
    <dxsch:DayView 
                TimeRegionContentTemplate="{StaticResource lunchRegionTemplate}" /> 
</dxsch:SchedulerControl> 

Note

The TimeRegionContentTemplate cannot be set implicitly.

See Also