Log In
[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Map Control
   [Expand]Product Information
   [Expand]Getting Started
    [Expand]Scheduler Elements
    [Expand]Scheduler Structure
     Resources for Appointments
     Pop-up Menus
    [Expand]Data Binding
    [Expand]Supported Formats
      Introduction to Services in XtraScheduler
      Keyboard Services
      Mouse Services
      DateTime Navigation Services
      Resource Navigation Services
      Scheduler State Service
      Formatting Services
      Appointment Selection Service
      Selection Service
    [Expand]Time Zones
    [Expand]Scheduler Reporting
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]End-User Capabilities
   [Expand]Member Tables
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Report Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Mouse Services

The IMouseHandlerService in the XtraScheduler provides the capability to respond to mouse events. It has the following delegates:

  • OnMouseMove(MouseEventArgs e) - occurs when the user moves the mouse pointer over a control.
  • OnMouseDown(MouseEventArgs e) - occurs when the user presses the mouse button.
  • OnMouseUp(MouseEventArgs e) - occurs when the user releases the mouse button.
  • OnMouseWheel(MouseEventArgs e) - occurs when the mouse wheel moves.

To handle these events you should first create a new class inherited from the DevExpress.Services.MouseHandlerServiceWrapper and override its methods as needed. The following code snippet illustrates how this can be done:

The provider is the SchedulerControl instance that provides the service.

This class will replace the existing service that handles the mouse events.

The following code sample replaces the existing mouse handling service of the XtraScheduler with a custom one.

A System.Windows.Forms.MouseEventArgs specifies which mouse button is pressed, how many times the mouse button was pressed and released, the coordinates of the mouse, and the amount the mouse wheel moved.

Is this topic helpful?​​​​​​​