Back to Devexpress

SchedulerControl.FilterTimeRegion Event

wpf-devexpress-dot-xpf-dot-scheduling-dot-schedulercontrol-72c194c0.md

latest4.1 KB
Original Source

SchedulerControl.FilterTimeRegion Event

Raised each time a time region is about to be displayed by the scheduler’s view and allows you to hide this time region.

Namespace : DevExpress.Xpf.Scheduling

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

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public event FilterTimeRegionEventArgsHandler FilterTimeRegion
vb
Public Event FilterTimeRegion As FilterTimeRegionEventArgsHandler

Event Data

The FilterTimeRegion event's data class is FilterTimeRegionEventArgs. The following properties provide information specific to this event:

PropertyDescription
SchedulerThe scheduler that raised the event.
TimeRegionThe time region for which the event is raised.
ViewThe scheduler’s view that raised the event.
VisibleSpecifies whether to display the time region for which the event is raised.

Remarks

The TimeRegion property returns the time region for which the event is raised. Set the Visible property to false to hide this time region.

If the time region is hidden by the SchedulerControl.TimeRegionFilterCriteria or SchedulerControl.TimeRegionFilterString property, the event’s Visible property returns false. Set the Visible property to true to override the filter criteria/expression.

For regular occurrences, the FilterTimeRegion event is raised only once. In this scenario, the TimeRegion property returns the pattern.

Refer to the Filter Appointments and Time Regions topic for more information.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FilterTimeRegion event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-scheduler-filter-time-regions/CS/DXSample/MainWindow.xaml#L40

xml
CommandBarStyle="Ribbon"
FilterTimeRegion="{DXEvent Handler='@args.Visible = @args.TimeRegion.Interval.Duration.TotalHours > 23 or !(@args.View is $dxsch:MonthView)'}"
ShowDateNavigationPanel="True">

See Also

SchedulerControl Class

SchedulerControl Members

DevExpress.Xpf.Scheduling Namespace