Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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