Επεξεργασία

Κοινή χρήση μέσω


Slider.OnPreviewMouseLeftButtonDown(MouseButtonEventArgs) Method

Definition

Provides class handling for the PreviewMouseLeftButtonDown routed event.

protected:
 override void OnPreviewMouseLeftButtonDown(System::Windows::Input::MouseButtonEventArgs ^ e);
protected override void OnPreviewMouseLeftButtonDown (System.Windows.Input.MouseButtonEventArgs e);
override this.OnPreviewMouseLeftButtonDown : System.Windows.Input.MouseButtonEventArgs -> unit
Protected Overrides Sub OnPreviewMouseLeftButtonDown (e As MouseButtonEventArgs)

Parameters

e
MouseButtonEventArgs

The event data.

Remarks

When the IsMoveToPointEnabled property is true, this implementation moves the Thumb to the location of the mouse click.

This implementation marks the PreviewMouseLeftButtonDown event as handled by setting the Handled property of the event data to true. The event is handled by this method so that the RepeatButton controls of the Slider do not handle the event.

Notes to Inheritors

If you override OnPreviewMouseLeftButtonDown(MouseButtonEventArgs), always call the base implementation in your OnPreviewMouseLeftButtonDown(MouseButtonEventArgs) implementation. Failure to call the base implementation prevents base classes from handling the event with a class handler, which might change the run-time behavior of the final class. You can call the base implementation either before or after your special handling, depending on your requirements.

Applies to