All docs
V20.1
20.2 (EAP/Beta)
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

How to: Conditionally Show and Hide Time Regions

This example illustrates how to filter Time Regions that last less than a day in MonthView.

When you define a Time Region for an interval that is less than a day (several hours, minutes, etc.), the MonthView displays this region as if it takes the whole day. Handle the SchedulerControl.FilterTimeRegion event and set the event's Visible property to false to hide time regions with a duration of less than 24 hours.

 private void scheduler_FilterTimeRegion(object sender, FilterTimeRegionEventArgs e) {
    e.Visible = e.TimeRegion.Interval.Duration.TotalHours > 23
        || !(e.View is MonthView);
 }

You can use DXEvent to define the SchedulerControl.FilterTimeRegion event in XAML.

 <dxsch:SchedulerControl ...
       FilterTimeRegion="{DXEvent Handler='@args.Visible = @args.TimeRegion.Interval.Duration.TotalHours > 23 or !(@args.View is $dxsch:MonthView)'}">
    ...
</dxsch:SchedulerControl>