Back to Devexpress

SchedulerViewBase.TimeRegionContentTemplate Property

wpf-devexpress-dot-xpf-dot-scheduling-dot-schedulerviewbase-5e67323d.md

latest2.3 KB
Original Source

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

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public DataTemplate TimeRegionContentTemplate { get; set; }
vb
Public Property TimeRegionContentTemplate As DataTemplate

Property Value

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

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

SchedulerViewBase Class

SchedulerViewBase Members

DevExpress.Xpf.Scheduling Namespace