SchedulerControl.CustomizeVisualViewInfo Event
Enables customizing the visual representation of the currently active view's elements for the currently selected type of grouping appointments.
Namespace: DevExpress.Xpf.Scheduler
Assembly: DevExpress.Xpf.Scheduler.v14.2.dll
#Declaration
#Event Data
The CustomizeVisualViewInfo event's handler receives an argument of the CustomizeVisualViewInfoEventArgs type. The following properties provide information specific to this event:
Property | Description |
---|---|
Visual |
Gets an object which contains information on the visual representation of visual elements displayed in the Scheduler Control, depending on the current active view and group type currently applied to appointments. |
#Remarks
Handle the CustomizeVisualViewInfo event to customize the visualization of the current active view's elements displayed in the scheduler control, when one of the available types of grouping is applied to appointments.
The event parameter's VisualViewInfo property returns the DevExpress.Xpf.Scheduler.Drawing.VisualViewInfoBase class descendant, providing access to information on visual representation of the current view's elements, depending on the currently applied group type.
#Examples
This example demonstrates how to handle the SchedulerControl.CustomizeVisualViewInfo event to hide day headers and time ruler headers in the scheduler control when the Day View is currently active and no grouping is applied to appointments. To do this, set the VisualDayViewResourcesBasedViewInfo.ShowDayHeaders and VisualDayViewResourcesBasedViewInfo.ShowTimeRulerHeader properties to false.
using DevExpress.Xpf.Scheduler;
using DevExpress.Xpf.Scheduler.Drawing;
// ...
private void scheduler_CustomizeVisualViewInfo(object sender, CustomizeVisualViewInfoEventArgs e) {
// Get whether the Day View is a current active view and no grouping is applied to appointments.
if (e.VisualViewInfo is VisualDayViewGroupByNone) {
VisualDayViewGroupByNone dayViewByNone = (VisualDayViewGroupByNone)e.VisualViewInfo;
// Hide day headers.
dayViewByNone.ShowDayHeaders = false;
// Hide time ruler headers.
dayViewByNone.ShowTimeRulerHeader = false;
}
}