PanPad Class
Represents a control that allows scrolling in any direction with varying magnitude.
public class PanPad : Control
- Inheritance:
- object Visual UIElement FrameworkElement Control object
Constructors
PanPad()
Initializes an instance of the class.
public PanPad()
Properties
Interval
Gets or sets the interval between Pan events. This is a dependency property.
public Duration Interval { get; set; }
Property Value
IsPanning
Gets a value indicating whether the control is currently panning. This is a dependency property.
public bool IsPanning { get; }
Property Value
- bool:
true
if the control is currently panning; otherwisefalse
. The default value isfalse
.
MaxOffset
Gets or sets the maximum offset used when panning. This is a dependency property.
public double MaxOffset { get; set; }
Property Value
- double:
The maximum offset used when panning. The default value is
0.0
.
Remarks
When set to 0.0
, then no limit is enforced. When set to a positive number, then the resulting offsets can be
+/- the max offset.
Methods
OnMouseDown(MouseButtonEventArgs)
Invoked when an unhandled Mouse.MouseDown
attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnMouseDown(MouseButtonEventArgs e)
Parameter | Type | Description |
---|---|---|
e | MouseButtonEventArgs | The MouseButtonEventArgs that contains the event data. This event data reports details about the mouse button that was pressed and the handled state. |
OnMouseUp(MouseButtonEventArgs)
Invoked when an unhandled Mouse.MouseUp
routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnMouseUp(MouseButtonEventArgs e)
Parameter | Type | Description |
---|---|---|
e | MouseButtonEventArgs | The MouseButtonEventArgs that contains the event data. The event data reports that the mouse button was released. |
OnPan(PanEventArgs)
Raises the Pan event.
protected virtual void OnPan(PanEventArgs e)
Parameter | Type | Description |
---|---|---|
e | PanEventArgs | A |
Events
Pan
Occurs when the control is panning.
Fields
IntervalProperty
Identifies the Interval dependency property. This field is read-only.
public static readonly DependencyProperty IntervalProperty
IsPanningProperty
Identifies the read-only IsPanning dependency property. This field is read-only.
public static readonly DependencyProperty IsPanningProperty
MaxOffsetProperty
Identifies the MaxOffset dependency property. This field is read-only.
public static readonly DependencyProperty MaxOffsetProperty
PanEvent
Identifies the Pan
routed event. This field is read-only.
public static readonly RoutedEvent PanEvent